br0ken Posted January 8, 2008 Share Posted January 8, 2008 Hi All, I'm writing an eCommerce system that has a publish feature. All cats/subs and products are read from the database and written to static html files when published. I've got the code for this perfect and it works fine on small sites but sites with larger structures, execution seems to halt after 60 seconds. When the execution stops I don't get any error message what so ever indicating that the execution time has ran out. I've modified the time limit using set_time_limit() just to be sure but this has no affect. If any one has any ideas what could be making PHP halt execution without an error after 60 seconds let me know. Another way around my problem would be to speed up the processing time so that large sites require less than 60 seconds to publish. If any one has any tips on how to write to files efficiently (im currently using fwrites) that would be great too. All the best, Jack Quote Link to comment https://forums.phpfreaks.com/topic/85085-ecommerce-php-execution-halts-after-60s/ Share on other sites More sharing options...
OldManRiver Posted January 8, 2008 Share Posted January 8, 2008 Jack, Author of "Commercial Package Contribution" for osCommerce here! You are probably having an issue with MySQL on the site in question. Login to the ISP and find their phpMyAdmin interface for your MySQL DB. See what the timeout and number of record settings are there. Some ISPs disable these so you can not see, change or admin these. You maybe faced with that dreaded "tech support" call. Keep us posted. OMR Quote Link to comment https://forums.phpfreaks.com/topic/85085-ecommerce-php-execution-halts-after-60s/#findComment-433959 Share on other sites More sharing options...
br0ken Posted January 8, 2008 Author Share Posted January 8, 2008 I have another package to modify MySQL settings but I couldn't find a query timeout anywhere. Is there a way to edit this setting manually in a .ini file? Thanks for the speedy reply friend! Quote Link to comment https://forums.phpfreaks.com/topic/85085-ecommerce-php-execution-halts-after-60s/#findComment-433986 Share on other sites More sharing options...
br0ken Posted January 8, 2008 Author Share Posted January 8, 2008 I've attached a picture of the settings in my MySQL Administration program. Any idea which setting is the one messing me up? [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/85085-ecommerce-php-execution-halts-after-60s/#findComment-433998 Share on other sites More sharing options...
OldManRiver Posted January 8, 2008 Share Posted January 8, 2008 Jack, If the settings are not available, then it's time to get on the phone with tech support. They've most likely disabled them and you have to know their limitations. I always leave all mine open, but for good security the admins are supposed to tighten them down. What that means is you are faced with one of two scenarios: a.) They relax the settings so your app will run, b.) You have to add code to the MySQL processing on the backend, (that let's you know when the time or row count is exceeded, set a marker in your "SELECT" or "UPDATE" sequence and make subsequent calls.) Also while you have tech support on the phone, ask them to check your .htaccess file, cause sometimes this can lock you out also, when a secure transaction is suppose to run and the certificates validation path is not right. After you chat with tech support, respond with what they say and if it appears to be something else, we'll work through it together. OMR Quote Link to comment https://forums.phpfreaks.com/topic/85085-ecommerce-php-execution-halts-after-60s/#findComment-434009 Share on other sites More sharing options...
OldManRiver Posted January 8, 2008 Share Posted January 8, 2008 Jack, Sorry you were pasting the image while I was replying. Yup it's that "Write" timeout that is nailing you. If your number of products is large this should be at least 5 minutes or 300 sec. I'd change the read to half or 2/3'rds that (either 150 or 200). Test at those levels, if you can change them, then if needed bump them up. See where the session timer is at 28800 or 480 hours. I would change that down to 1440 or 24 hours, then as needed work the process timers up, using that as my limit. OMR Quote Link to comment https://forums.phpfreaks.com/topic/85085-ecommerce-php-execution-halts-after-60s/#findComment-434013 Share on other sites More sharing options...
br0ken Posted January 8, 2008 Author Share Posted January 8, 2008 Thanks again for the speedy reply OMR! I've uploaded a picture of my new settings but the script seems to timeout around the same time again Any more ideas friend? *I've just added a new attatchment. For some reason the old one was here too. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/85085-ecommerce-php-execution-halts-after-60s/#findComment-434019 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.