MySQL server has gone away

General Support for technical Issues relating to AlegroCart
Post Reply
mekgacom
Posts: 10
Joined: Tue Feb 26, 2013 11:45 am

MySQL server has gone away

Post by mekgacom » Mon Mar 11, 2013 12:06 pm

Good day
Way am I getting this error

MySQL Error: MySQL server has gone away
Error No: 2006
delete from session where expire < '1363005588'
Path: /alegroadult/sex-toys-for-men/lubes-and-potions-men.html/page/1
Query String: sex-toys-for-men/lubes-and-potions-men.html/page/1
IP:66.249.75.85 Remote Host:crawl-66-249-75-85.googlebot.com
log: Error was logged to file: /home/mekgacom/public_html/adult/alegroadult/logs/error_log/error-20130311.txt.
##################################################


And now I am getting this warning


Warning: mysql_connect() [function.mysql-connect]: Too many connections in /home/mekgacom/public_html/adult/alegroadult/library/database/database.php on line 22

How do I fix this?

User avatar
Brent
Site Admin
Posts: 4459
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: MySQL server has gone away

Post by Brent » Mon Mar 11, 2013 2:50 pm

This may be your problem. Check this article.
http://blog.arvixe.com/421-too-many-con ... zilla-fix/

Other than that, you may need to contact your host to see how many connections your site is set for.

mekgacom
Posts: 10
Joined: Tue Feb 26, 2013 11:45 am

Re: MySQL server has gone away

Post by mekgacom » Mon Mar 11, 2013 9:48 pm

Good day

This is what my hosting replied


"If you see error message 'MySQL server has gone away', it might be that your script is not optimized and makes too many connections to the database (or your website is very active, has many users online at the same time).
You may also get this error if your script executes heavy/slow MySQL queries.

First of all you should check if your database is well optimized and has indexes where needed. You should contact the script developers and ask assistance."

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: MySQL server has gone away

Post by leo » Tue Mar 12, 2013 4:12 am

Upload this to your server, then go to admin/configuration/setting/Shop setup tab and enable Display Parse Time.
The number of the queries will be displayed in the footer of the catalog. Test it, and let us know the results.
Attachments
count_queries.zip
(8.95 KiB) Downloaded 358 times

mekgacom
Posts: 10
Joined: Tue Feb 26, 2013 11:45 am

Re: MySQL server has gone away

Post by mekgacom » Tue Mar 12, 2013 11:32 am

Hi
Thanks for the script.

Just one stupid question.

I uploaded it then extracted it

Should I move the extracted files directly in-between Alegro’s files?






leo wrote:Upload this to your server, then go to admin/configuration/setting/Shop setup tab and enable Display Parse Time.
The number of the queries will be displayed in the footer of the catalog. Test it, and let us know the results.

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: MySQL server has gone away

Post by leo » Tue Mar 12, 2013 12:20 pm

You have to overwrite your original files with these.
Please take into consideration that the "admin" directory was renamed during the install process, i.e. there is no "admin" dir on your server. (Copy the content of admin into your renamed admin.)

mekgacom
Posts: 10
Joined: Tue Feb 26, 2013 11:45 am

Re: MySQL server has gone away

Post by mekgacom » Fri Mar 15, 2013 11:41 am

leo wrote:You have to overwrite your original files with these.
Please take into consideration that the "admin" directory was renamed during the install process, i.e. there is no "admin" dir on your server. (Copy the content of admin into your renamed admin.)

Hi thanks for the script. It looks like the problem has been sorted. :D

User avatar
Brent
Site Admin
Posts: 4459
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: MySQL server has gone away

Post by Brent » Fri Mar 15, 2013 1:21 pm

Can you give use an idea what the issue was so we can pass on to anyone esle should a similar situation arrises.

Post Reply