An odd issue popped up today when running database updates using CSV imports for ubercart products.
Server is Xen / Debian 6 / Percona / Latest BOA stable.
I've been running imports on a drupal site all day and from time to time I'm getting a stoppage stating "504 Gateway Time-out".
I hit refresh and it seems to be doing the import ok, and I'm a bit concerned about what might be causing this?
I also noticed that a couple of the imports would actually stop stating error "502 Bad Gateway".
I have:
@ini_set('max_execution_time', 0);
in the local.settings.php file for this host.
Is there something else I could add to avoid these time outs? I can confirm that out of the many imports I've done today, only a few do this and it appears to be the larger imported data.
Surely there is a logical explanation.
Thanks in advance.
Comments
Comment #1
snlnz commentedAfter trawling the issue queue its obvious I might have failed to run the BOND.sh.txt tuner script to increase the default time-out values.
I have since run BOND.sh.txt and it appears to have fixed the problem, I am now not receiving the time out error messages and all seems to be well.
I have noticed a significant memory usage drop by about half since running the BOND.sh.txt tuner script so that's a bonus!
Comment #2
snlnz commentedUnfortunately I got a bit further through the import process and received a 502 Bad Gateway error so it's still not fixed.
Comment #3
omega8cc commentedYou probably need to raise also other limits, as we already explained here: http://drupal.org/node/1328832#comment-5191990 - they are not yet handled by BOND tuner.
Comment #4
snlnz commentedThanks for your reply.
The following values exist currently
in /opt/etc/php-fpm.ini
<value name="request_terminate_timeout">3600s</value>in /opt/etc/php.ini
Since your reply, I have just adjusted:
/var/aegir/config/nginx.conf
and restarted nginx.
Will post further progress.
Comment #5
snlnz commentedSo I've been unusually successful with the last lot of mass product imports but as soon as I try a large complex CSV import I get the error again. This time I was watching
/var/log/php/php-fpm-error.logHopefully this provides a bit more insight to the problem. I'm just a bit unsure what to adjust as I've tried all the areas of interest that have been discussed so far.
Thanks in advance.
Comment #6
omega8cc commentedThese notices are expected and they simply say that the PHP-FPM daemon is reloaded every 30 minutes - this is because there is something like that defined in the auto-healing script. You may want to comment out this line
/etc/init.d/php-fpm reloadin the/var/xdrago/clear.shscript. Or disable it completely in/var/spool/cron/crontabs/rootand restart cron.Comment #7
snlnz commentedReally? Even this message?
fpm_request_check_timed_out(), line 146: child 47151, script '/data/disk/USER/distro/001/ubercart-6.x-2.7-6.22/index.php' (pool default) executing too slow (30.093366 sec), loggingThis was message occurred exactly the same timing as when the import failed and issued the Gateway 502 error popped up. There's no consistency in the error message and it would be really good to know a better method of debugging the problem. I have this site running on a local dev environment and I don't get any issues on apache/mysql it's just the octopus server.
Hope you can help I'd be sad to have to resort to redeploying an apache based solution to fix the problem.
Comment #8
snlnz commentedUpdate: I've cloned the site to dev.sitename.com and effectively disabled the caching altogether as outlined on omega8.cc documentation. Now I don't get any errors and the importer works fine!
My question is, how do I disable any caching that automatically gets applied under boa, such as memcached, boost, speed booster just for this site or any other particular site that experiences this issue?
Thanks in advance!
Comment #9
omega8cc commentedIt is explained in this article:
http://omega8.cc/speed-booster-cache-boost-and-advagg-108#cache-off
http://omega8.cc/speed-booster-cache-boost-and-advagg-108#speed-off
Comment #10
snlnz commentedThanks for the links. I think the issue is resolved with speed booster and cache disabled, plus I have installed advagg.
Will post an update over the next couple of days.
So in future anyone having trouble with 504 Gateway or 502 Gateway time outs while running batch.api bulk node manipulation first try to disable the caching system by touching the control files:
NO.txt file in sitename/modules/cache/and
README.txt in sitename/modules/ubercart/I struggled to resolve this for a while but the learning curve has been invaluable.
Comment #11
omega8cc commentedAny news on this issue?
Comment #12
snlnz commentedAfter it was resolved I hadn't done any further testing. So simply disabling the speed booster and cache fixed it for me.
I haven't had any other issues since.
So it can be closed?
Comment #13.0
(not verified) commentedadded bad gateway error