We're getting a 504 time out in Wordpress with a feature we have attached to "publish post" which takes an attacked zip file, unzips it, moves the unzipped files to s3, makes a new Zip and moves that to S3 too. On bigger files its timing out after 60 seconds.
Can I make it clear here now this ISNT a user function - this doesn't happen from the front end of the site when a user does anything. The user uploads the content images, zip etc to a post which waits for us in the admin panel. Upon moderation we can chose to delete the post (which removes all the data they uploaded at the same time) or publish the post which then takes the zip they uploaded, unzips it, checks for viruses, deletes anything that isn't an MP3, uploads the individual MP3's to S3, creates a new zip file and uploads that to S3 too. This is all running from EC2. As you can imagine while this doens't put too much load on the server CPU, it does often take longer than 60 seconds to move all this data to S3.
So I've seen the suggestions on How do I prevent a Gateway Timeout with Nginx
I've put fastcgi_read_timeout into my nginx.conf and set it (for now) to 2700 in attempt to avoid all time out errors I've done this with everything that involves timeouts. I've also added client_body_timeout and send_timeout as mentioned on that page. But still the process times out 60 seconds in.
Am I possibly putting them into the wrong place on nginx.conf (it restarts with no problem) using the wrong times, or perhaps there is another feature that will allow this php process to complete.
I have all php-fpm times as long as I can set them too.