How to generate a stack trace upon errors I am sysadmin trying to debug a Drupal site. In my server logs I can see Drupal making the same requests again and again to our Solr instance until PHP eventually runs out memory, and Apache returns a 500 error.

How can I configure Drupal to log a stack trace somewhere on the disk?
You can use the Devel module, and select one of the "Krumo Backtrace" options it provides in its configuration page at admin/config/development/devel.


   


Make sure to visit admin/config/development/logging and select "Errors and Warnings" or "All Messages". If you have the Syslog module, or any other logging module enabled, you may need to disable it and enable the Dblog module.