php - Magento curl error 503 after ~60 seconds


I have developed a custom module for magento 1.9 that generates an XML feed with products to be used in an ERP. I am using curl to run it with cron ( curl http://url/action ), but after about 60 seconds, I get a 503 error from magento. I have increased max_execution_time to 300 (verified using phpinfo() ) but it seems to make no difference.

Can anyone help me troubleshoot this? I am using a VPS server with Plesk.

Note: There are around 2000 products right now, so processing does need more than 60 seconds.




Setting a global value of 300 formax_execution_time is a bit dangerous as this would allow normal (non-cURL) requests to execute for that amount time. (if it did end up working.) The reason that it may not be working is ifmax_execution_time is explicitly defined within your Magento installation root's.htaccess file.

Ideally, you would includeini_set('max_execution_time', 300); at the top of your Magneto module's controller so it will only run there for 5 minutes.

People are also looking for solutions to the problem: php - Artisan Cant See WP_Query in Global Namespace


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.