Closed torvista closed 6 months ago
What is the PHP Memory Limit when you're running out? I've got one site that uses 512M and is able to create a feed-file for 15,000+ products in a single shot without issue.
I've got 8161 products and up to 8000 works before getting a Gateway 504 error.
... and what's the feed's Max Time Limit set to?
Maximum input time:3600 Max execution time (in seconds):300
Seems to fail between 1-2 minutes.
That 1-2 minutes sounds familiar, that's probably your webhost's server's base timeout causing the Gateway timeout.
I've asked my clients' webhosts to increase that base timeout so that the feed gets generated in a single chunk. Note, too, that the PHP processing has no clue as to what that underlying (and overriding) timeout value is.
Server log showed
2024/02/21 18:03:10 [error] 14935#14935: *47824 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: mysite.es, request: "GET /gpsf_main_controller.php?key=&feed=fy_un_tp&limit=8226&offset=0¤cy_code=EUR&language_id=2 HTTP/2.0", upstream: "https://xxx.xxx.xxx.xxx:8443/gpsf_main_controller.php?key=&feed=fy_un_tp&limit=8226&offset=0¤cy_code=EUR&language_id=2", host: "www.mysite.es", referrer: "https://www.mysite.es/adminfolder/index.php?cmd=gpsf_admin"
This was resolved by increasing the nginx parameter: proxy_read_timeout 90;
to 120. in /etc/nginx/nginx.conf
I have my own update from the previous version of this plugin, before this branch surfaced and have too much invested in that one to contribute to this one yet. But while testing this, there is the same issue that I imagine all will come across regarding memory/timeouts.
Mine can process about 4000 products before hitting a memory limit, so I need to produce three files to cover all my products. On a local pc I can only do about 3000 at a time.
So, a suggestion for a future enhancement would be to produce all the files necessary in one process/from one cron. And for laughs, in all the languages!