Troubleshooting

From DreamFactory
Jump to: navigation, search
DreamFactoryTroubleshooting

If you experience issues with some of the services, like SQL database connection or server-side scripting, please make sure you have all of the necessary drivers [installed](Installation) with your DreamFactory instance. Depending on the way your instance was installed and the hosting platform, some [additional libraries, drivers, or packages](Installation/Additional-Drivers) may be required for certain services to work properly. Some services, like SQL Database Services connecting to Microsoft SQL Server, have licensing that prevents the drivers from being included or enabled by default. If you are unable to install or enable the necessary drivers, please contact support for assistance.

 Note: When the "install directory" is mentioned, it is the DreamFactory code base install that is being referred to. In a Bitnami install, the DreamFactory code base starts at <bitnami install path>/apps/dreamfactory/htdocs/.


Logs

Most logging done by the DreamFactory instance will be located in a file called dreamfactory.log.

 {install directory}/storage/logs/dreamfactory.log

Other errors may be reported by the web server (i.e. Apache writes to error.log, location based on its configuration), or system log.

Logging configuration

DreamFactory supports hierarchical Log Level and goes in following order.

   DEBUG -> INFO -> NOTICE -> WARNING -> ERROR -> CRITICAL -> ALERT -> EMERGENCY

Setting your DreamFactory log level to any of these will log that level and the levels that are on it's right. So, if you set your log level to ERROR then the system will log all ERROR, CRITICAL, ALERT, and EMERGENCY messages in your log file. By default, log level is set to WARNING. To change it, set DF_LOG_LEVEL any of the above in your .env file located in your install directory. Here are some additional logging environment settings that you may edit in .env

Parameter Default value Notes
APP_DEBUG false Shows/hides error messages on the web.
APP_LOG single Controls the format of the log file, options are 'single', 'daily', 'syslog', or 'errorlog'
DF_FREETDS_DUMP Enabling and location of FreeTDS dump file, defaults to disabled or default freetds.conf setting
DF_FREETDS_DUMPCONFIG Location of FreeTDS connection dump file, defaults to disabled

Here are some additional logging configuration settings that you may edit in `config/df.php`

Parameter Default value Notes
log_cors_info false Enables/disables detailed CORS logging
log_events true Determines if all events dispatched to a handler are logged
scripting.log_memory_usage false Enables/disables logging memory usage after a script is executed

Apache

Finally, when configuring your Apache virtual host, you may configure the Apache logs for your DreamFactory instance to be co-located with your DreamFactory logs. These logs are useful for debugging and troubleshooting both PHP and Apache behavior. For example, in /etc/apache2/sites-enabled/dreamfactory.conf

ErrorLog {install directory}/storage/logs/error.log
CustomLog {install directory}/storage/logs/access.log combined

Cache

When all else fails, clear the cache. Cache can be cleared via the Admin application by clicking the Config tab, then Cache menu option, and click 'Flush System-wide Cache'. This can also be accomplished with the following command in the install directory...

php artisan cache:clear