Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
I have been struggling with a timeout error in a couple of Drupal 8 sites, which I have not been able to reproduce. When I deploy them into my colleague’s production server (a Mac machine), all the Drupal 8 sites are experiencing a page lock up (the browser waits indefinitely). I have not been able to reproduce the error in my machine (running Debian), neither in testing instances in other servers (e.g. a free Pantheon instance). The only clues I have for the moment are:
- The error seems to not occur so often once I disable cron in the Drupal sites. However, if I run cron manually, I have not been able to reproduce it neither.
- This only affects Drupal 8 sites. The rest of the sites (Drupal 7 and many others) are not affected at all.
- The error disappears rebooting Apache. However, only when I do the following combination: “/opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop” & “/opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start”
- My colleague suggested me to use “/opt/local/apache2/bin/apachectl graceful” , but in that case, the error does not disappear.
Any ideas on what the issue could be? I am running different versions of Drupal in the sites (8.0.2 and 8.0.5). At https://github.com/CRESS-Surrey/erie_website_code/issues/31#issuecomment-172512374 I have attached as well some captures of the http headers in a successful and unsuccessful request . I am trying to document the issues as well (more information) at that issue and https://github.com/drozas/cecan/issues/23 for the other site.
Thanks a lot!
Even if you say its not: This issue is most commonly not only Drupal 8 related. You will find issues for Drupal 7 reporting near the same behaviour. It turns out that cron starts after the expired period with first page request. If this happens, the cron seems to take endless time and seems to interfere with the page request in the same moment. Many experienced users run their crons from Drush manually or combine it with server crons. But generally spoken :
There are 3 possible points to look at and to modify (and you already named some of them), which all can interfere each other or can be responsible for it each at their own allone:
Take a look at your php and apache settings for memory, cache size
and sql query time settings. Cron is a big wave coming. From my
experience a smooth Drupal experience can be only granted by
increasing it over the given amount suggested.
Turn off automatic cron frequence (as you sad, mostly set by 3
hours, set it to -none-) in the admin/config pages, but make sure
that you run cron by yourself manually often enough (thats how I
generally do it). For some reasons and some unclear circumstances
(mostly server related) this is often the only option to prevent
Make sure that you have turned off all unneeded modules on
production sites. Even if some suggestions say its not related, my
experience is, that turning off help, update, dblog (use syslog
instead) etc. at production sites makes Drupal faster and prevents
Not the answer you’re looking for? Browse other questions tagged 8 cron or ask your own question.