Community

"Too many connections" when editing "Basic settings" of a view

I have a problem with a Drupal 6 site. It's hosted on shared hosting, where I can only use up to 20 database connections. It attracted more visitors than I expected. So maybe it simply became too big for a small shared hosting space. But it feels like a bug to me. here is why.

There is a view with a lot of pages (~20 000 nodes, 10 per page), two fields per node and three exposed filters. Nothing special really. It's cached, so performance-wise everything is fine (not everybody uses the exposed filters). I can edit the view, edit fields, add fields. But whenever I want to save changes in the "Basic settings" section on the view's edit page, the small blue clock stays there for several minutes and stops with an error 500 message. The site is then offline because it can't connect to the database ("Too many connections"). When I close the tab while it is trying to save my changes (pressing Cancel doesn't work either) it's the same. After a few minutes the site goes offline. And it's the same with any other view. I have a different view that only user 1 can access and it's the same there. Sometimes it works and saves the changes (sometimes after one or two minutes, someties after a few seconds). I think this is when only a few visitors are on.

It's Views 6.x-2.16 and MySQL 5.0.95. I haven't found an issue on the views module related to this. So, does this simply indicate that I should get a VPS or dedicated server for this site so I can use more database connections? I don't see why editing a view is so special and needs many connections.

Comments

with shared hosting, you're

with shared hosting, you're not going to get the benefit of really troubleshooting what is wrong.

best advice i can give would be to take a copy of the site and put it on a dev machine and troubleshoot it there. if the same thing happens on your development box, then it could be a bug. otherwise, it may be a configuration issue with your server.

also, you really should avoid editing views on a live site unless it's ok to break things from time to time. views integrate really nice with features, and if you're not comfortable yet with features, then you can use the import/export functionality in views to copy your views from dev to live.

Thanks for the reply. It's

Thanks for the reply. It's kind of "OK" to break this site because it's a private project for fun, no information people may rely on. I have development copies of other sites but thought it's not necessaey for this one. But in the long term I'd like to solve this anyway.

I do have full SSH access to my account. so maybe the troubleshooting you were thinking about is possible on the server. The site was on a completely different mashine before where I had the same problem. I'll make a copy on my PC and see if it works there.

I tested this on three

I tested this on three different servers now, all had the same problem, even with no visitors except me. On my PC, running Ubuntu, it works all fine, though. So I am able to build a view and tranfer it to the life site, which is good. But I still like to know what's happening there. I'm not too familiar with everything behind Drupal. So, any idea where I should start looking for the problem?