monkeyman Posted December 13, 2005 Posted December 13, 2005 I just sent the following to my tech guy: "A problem that has been happening like clockwork about every 2 weeks...the osCommerce store section of my website paulmcgeheeart.com goes down and is replaced by a white page with a "sessions error" message. It can be immediately brought back by my going into phpMyAdmin and running a "repair" on the "sessions" table. But the thing is, I shouldn't have to be policing it like this, I may be away on vacation and come back to find that I have missed 2 weeks worth of orders. I suspect that, since the "sessions" file in phpMyAdmin says "in use" while the problem is happening, that this is being caused by spiders like msnbot and googlebot indexing everything and trying to purchase everything in the process, as far as I can determine from reading over my web-logs. What can be done to prevent this from happening again? The osC message boards allude to the possibility of putting "dissallow" commands in the osC code, but that is beyond my expertise...would not want to really mess up an otherwise good thing. What do you think is going on from the sound of this? I have posted numerous messages about this on the board over the past few months, but have not gotten many leads other than"put the spider session setting to true" which does nothing towards stopping my store from going down every 2 weeks." ...and this is the reply I received: "this issue happens when the mysql database server is shutdown. then the tables of the database gets corrupted and have to be repaired." ...is this the case? Why would the mysql database server be shut down every 2 weeks? What can I do to keep my "sessions" table from getting corrupted each time this happens, resulting in the disappearing store??
Dennisra Posted December 14, 2005 Posted December 14, 2005 ...is this the case? Why would the mysql database server be shut down every 2 weeks? What can I do to keep my "sessions" table from getting corrupted each time this happens, resulting in the disappearing store?? I have this problem as well. Every day or two I must optimize the mysql tables. Anyone have a comment or solution?
Jack_mcs Posted December 14, 2005 Posted December 14, 2005 My guess would be that it is the server causing it. Talk to your host and see if they can explain the problem. There shouldn't be anything in oscommerce that is causing the problem unless the code has been modified somehow to fiddle with the database where it shouldn't. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Dennisra Posted December 14, 2005 Posted December 14, 2005 I know for sure it is the mysql server that is causing it. I am the server admin and I can't tell why Osc sessions are such a problem.
Guest Posted December 14, 2005 Posted December 14, 2005 One possible solution: store sessions in files. It doesn't address the mysql problem but may alleviate the immediate issue. Be sure to change the default /tmp under Admin->Configuration->Sessions to something under your own user area but not in the public part of the web site. ed
Dennisra Posted December 14, 2005 Posted December 14, 2005 Ed: That is an idea. Is storing in a file slow done the site to any degree?
Guest Posted December 14, 2005 Posted December 14, 2005 Ed:That is an idea. Is storing in a file slow done the site to any degree? It shouldn't unless you've got disk thrashing issues. In fact, some people think it speeds the site up because it reduces the database accesses. ed
monkeyman Posted December 14, 2005 Author Posted December 14, 2005 One possible solution: store sessions in files. It doesn't address the mysql problem but may alleviate the immediate issue. Be sure to change the default /tmp under Admin->Configuration->Sessions to something under your own user area but not in the public part of the web site. ed How would I go about doing this? What would I name the file? Where would I put the file? What are any potential dangers in doing this? Will this affect any aspect of customers placing orders or logging in to a session? And, finally, will this make it so that I never have to worry about my site disappearing again? What is scary to me is that everyone seems to have a different answer for this problem in the several months I have been having the problem...feel like I am on shaky ground. Would like to get this resolved for good. Is this the final answer?
monkeyman Posted December 14, 2005 Author Posted December 14, 2005 How would I go about doing this? What would I name the file? Where would I put the file? What are any potential dangers in doing this? Will this affect any aspect of customers placing orders or logging in to a session? And, finally, will this make it so that I never have to worry about my site disappearing again? What is scary to me is that everyone seems to have a different answer for this problem in the several months I have been having the problem...feel like I am on shaky ground. Would like to get this resolved for good. Is this the final answer? Any answers anyone? Please?
♥yesudo Posted December 14, 2005 Posted December 14, 2005 This contribution run on a daily cron job may also help: http://www.oscommerce.com/community/contributions,3075 Your online success is Paramount.
Guest Posted December 15, 2005 Posted December 15, 2005 How would I go about doing this? What would I name the file? Where would I put the file? What are any potential dangers in doing this? Will this affect any aspect of customers placing orders or logging in to a session? And, finally, will this make it so that I never have to worry about my site disappearing again? What is scary to me is that everyone seems to have a different answer for this problem in the several months I have been having the problem...feel like I am on shaky ground. Would like to get this resolved for good. Is this the final answer? Paul, If done correctly, there's no danger. Here's what you need to do. Create a session directory. This should be outside your web space. So, if you have /home/monkeyman/public_html/catalog, create a folder called sessions like /home/monkeyman/sessions. Set permissions to 777. Only the server can write there, no one else. Point osCommerce at the new folder. Go into Admin and go to Configuration->Sessions. Set Session Directory to the FULL path: /home/monkeyman/sessions. Change BOTH catalog/includes/configure.php and admin/includes/configure.php. Near the bottom, you should see: define('STORE_SESSIONS', ''); If it says 'mysql' as the 2nd parameter, make it the empty quotes shown. That should do it. Try to do it when no one is on the shop or has anything in their shopping cart. ed
Recommended Posts
Archived
This topic is now archived and is closed to further replies.