PHP vs LC server + 504 Gateway Timeout

jbv jbv at souslelogo.com
Wed Jan 24 07:15:34 EST 2018


Hi list

On my on-rev account I have a LC script that calls a php script via the
shell, and the php dumps the content of a mySQL db. Then another LC script
(triggered later by another cgi request) builds a zip archive (using
revzip) of the dump + a few small files.
This scripts have been running for years without problem, even if the size
of the db dump was constantly growing.
Then suddenly a couple of days ago, the 2nd script (building the zip
archive) started returning a "504 gateway timeout" error.

As a solution, I modified the 1st script (php) to dump & gzip the db
content in one single pass. And to my surprise, this didn't return any
error, but is also twice faster than the 2nd LC script that was only
zipping the content of the dump.
This was a surprise because I thought that dumping + zipping would be a
heavier task than zipping only, and would take more time...

Any rational explanation for that ?

Thanks in advance
jbv





More information about the use-livecode mailing list