♥FWR Media Posted October 11, 2007 Share Posted October 11, 2007 I identified today the main reason that my oscommerce sites had become very slow loading so below is the solution in the hope that it helps someone. Do I have this problem? Check the images on non secure pages, if they are loading as https then you have the same problem. Also viewing source will show that the base href for non secure pages is https. In catalog/includes/application_top.php the following line sets the request type SSL or not. // set the type of request (secure or not) $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL'; For whatever reason my server was always returning ON even when not an SSL request. This causes the base href of non secure pages to be https and causes ALL images to load as https://www.mysite.com/thisimage.php causing massive slowdown. Changing the line to ... // set the type of request (secure or not) $request_type = (getenv('SERVER_PORT') == '443') ? 'SSL' : 'NONSSL'; Works, at least on my server. Hope this helps someone. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
♥FWR Media Posted November 28, 2007 Author Share Posted November 28, 2007 it is also necessary to make this change in ... catalog/includes/functions/general.php tep_redirect if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page change to if ( (ENABLE_SSL == true) && (getenv('SERVER_PORT') == '443') ) { // We are loading an SSL page Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
aryaji Posted February 8, 2010 Share Posted February 8, 2010 great... !! thank for your post Link to comment Share on other sites More sharing options...
b2995 Posted September 4, 2010 Share Posted September 4, 2010 OMGoodness! What a difference this little change made!!! Link to comment Share on other sites More sharing options...
Pilotshop Posted March 29, 2011 Share Posted March 29, 2011 I too was struggling with this. SSL was not my problem, it was a poorly optimized mysql. top showed mysqld was continusouly pegged at 100%+ sometimes almost 200% and response time was dreadfully. slow. Google clocked us at an average 11.9 seconds per page, some pages taking more than 30 seconds to load. For an ecommerce site, that kind of response is death. I tried the SSL trick, but found our pages were not loading https until checkout (which is what you want). It was clear that mysql was the problem. I tried optimizing all of the tables (I wrote a short php script to do this) but no joy. Then I thought perhaps I had a semaphore problem with ibdata - according to SHOW ENGINE INNODB STATUS that was most likely not the case. Then I sat and watched what queries were exactly being executed using SHOW FULL PROCESSLIST repeatedly and using copy and paste executing those queries so I could see how long they were taking. Any query that took longer than .5 seconds (some were over 10 seconds!) grabbed my attention. I noted from the query all of the fields that were either involved in a JOIN or WHERE clause and made sure that field had an index created for it in the appropriate tables. I ended up creating about 10 indexes that were not already present and now my site flies. Well, as much as can be expected for a site with 8000+ products and 350+ categories utilizing most of the features available (visit www.pilotshop.com for details). If there was a better way, I'd like to hear it. Tom Link to comment Share on other sites More sharing options...
shsram Posted April 19, 2011 Share Posted April 19, 2011 I too was struggling with this. SSL was not my problem, it was a poorly optimized mysql. top showed mysqld was continusouly pegged at 100%+ sometimes almost 200% and response time was dreadfully. slow. Google clocked us at an average 11.9 seconds per page, some pages taking more than 30 seconds to load. For an ecommerce site, that kind of response is death. I tried the SSL trick, but found our pages were not loading https until checkout (which is what you want). It was clear that mysql was the problem. I tried optimizing all of the tables (I wrote a short php script to do this) but no joy. Then I thought perhaps I had a semaphore problem with ibdata - according to SHOW ENGINE INNODB STATUS that was most likely not the case. Then I sat and watched what queries were exactly being executed using SHOW FULL PROCESSLIST repeatedly and using copy and paste executing those queries so I could see how long they were taking. Any query that took longer than .5 seconds (some were over 10 seconds!) grabbed my attention. I noted from the query all of the fields that were either involved in a JOIN or WHERE clause and made sure that field had an index created for it in the appropriate tables. I ended up creating about 10 indexes that were not already present and now my site flies. Well, as much as can be expected for a site with 8000+ products and 350+ categories utilizing most of the features available (visit www.pilotshop.com for details). If there was a better way, I'd like to hear it. Tom Hi, Im getting similar problems with my site loading. I have over 12000 products can you shed some light on to achieve faster loading time. www.desirablescents.biz Link to comment Share on other sites More sharing options...
ckouris84 Posted May 4, 2011 Share Posted May 4, 2011 I too was struggling with this. SSL was not my problem, it was a poorly optimized mysql. top showed mysqld was continusouly pegged at 100%+ sometimes almost 200% and response time was dreadfully. slow. Google clocked us at an average 11.9 seconds per page, some pages taking more than 30 seconds to load. For an ecommerce site, that kind of response is death. I tried the SSL trick, but found our pages were not loading https until checkout (which is what you want). It was clear that mysql was the problem. I tried optimizing all of the tables (I wrote a short php script to do this) but no joy. Then I thought perhaps I had a semaphore problem with ibdata - according to SHOW ENGINE INNODB STATUS that was most likely not the case. Then I sat and watched what queries were exactly being executed using SHOW FULL PROCESSLIST repeatedly and using copy and paste executing those queries so I could see how long they were taking. Any query that took longer than .5 seconds (some were over 10 seconds!) grabbed my attention. I noted from the query all of the fields that were either involved in a JOIN or WHERE clause and made sure that field had an index created for it in the appropriate tables. I ended up creating about 10 indexes that were not already present and now my site flies. Well, as much as can be expected for a site with 8000+ products and 350+ categories utilizing most of the features available (visit www.pilotshop.com for details). If there was a better way, I'd like to hear it. Tom Hi Tom, I have visited your site and I can tell that you've done a terrific job on optimization. I have been trying to do the same with indexing all intensively used table joins and I will eventually have over 180K items on our site, in which 60K will be in stock and available. Now aside from us using a heavily modded Year/Make/Model lookup, the site is pretty much stock and it loads decent on FireFox, Chrome & Safari...however in Internet Explorer (using 8), it loads very slow and I cannot figure out why. Do you know of any ideas to help? Thank you! PS: Excellent site you got there. I will recommend it to a friend of the family, as he is a pilot for American Airlines... -Chris Link to comment Share on other sites More sharing options...
pmdstudio Posted August 30, 2011 Share Posted August 30, 2011 To all OsCommerce hackers: Guys, very soon I will be behind you, and you'll have to kneel !!! P.S I've found a way to track them. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.