PHP vs LC server + 504 Gateway Timeout

Richard Gaskin ambassador at fourthworld.com
Wed Jan 24 13:53:51 EST 2018


jbv wrote:
 > 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...

Two tasks would seem to take longer than either one of them.

 > Any rational explanation for that ?

If the difference is the language, maybe PHP is dramatically faster than 
LC for that task.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list