WebFaction
Community site: login faq

Hi,

in my site the main page (where user spend most of their time) needs 140 queries (according to django-toolbar).

However, sometimes when running a small ajax request (every 10 secs using javascript's setInterval), I get a 'too many connections' error. It fails silently but I receive the e-mail. This ajax request is a very small overhead (just 3 simple queries) and returns a simplejson object with just one number.

I have done some optimization but I also need to know if there is a way and if I must increase number of connections Mysql can handle.

asked 06 Aug '12, 12:46

xpanta
622844
accept rate: 0%


You can't increase the maximum connections on your servers' shared MySQL instance - if you need that ability, then you'll need to run your own MySQL server.

That said, I don't really think you need to do anything - your server had recently been suffering from a high load condition which was causing queries to run slowly and exhaust the available pool of connections. We fixed the high load condition earlier today (about 4 hours ago), so I don't think you should be seeing these errors any more.

Hope that helps!

permanent link

answered 06 Aug '12, 14:10

seanf
12.2k41936
accept rate: 37%

Thank you very much. This helps a lot.

(08 Aug '12, 04:56) xpanta
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×168
×8

question asked: 06 Aug '12, 12:46

question was seen: 3,283 times

last updated: 08 Aug '12, 04:56

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM