Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

SQLSTATE[08004] [1040] Too many connections

Questions related to using nuBuilder Forte.
Post Reply
stevenmiller
Posts: 25
Joined: Mon Jul 06, 2020 4:23 pm
Has thanked: 3 times

SQLSTATE[08004] [1040] Too many connections

Unread post by stevenmiller »

Hi Forum,

I'got a table properties with 240 columns and about 500 entries and a second table tenants with about 50 columns and 2000 entries. Everything works fine, but when I want to edit a report where the SQL - statement is like

SELECT * FROM properties, tenants WHERE '#property_id#' = tenants_property_id

and I open the Report Designer, the server freezes and this message is shown in the frontend, as no #property_id# is chosen in the Report Designer and all entries are loaded.

Connection to the nuBuilder database failed: SQLSTATE[08004] [1040] Too many connections

Verify and update the settings in nuconfig.php

Restart your browser after modifying nuconfig.php in order for changes to be reflected


In the GUI everything works fine, as the report is called from an edit form, where the property_id is selected.
What can I do to not start too many connections as the maximum is already set to 500.

Thanks.
Steven
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: SQLSTATE[08004] [1040] Too many connections

Unread post by kev1n »

Hi,

Would and SQL like this work?

Code: Select all

SELECT * FROM properties, tenants WHERE 
'#property_id#' = tenants_property_id OR ('#property_id#' LIKE '#%' AND FALSE)
Basically, if the Hash Cookie property_id is not set, no rows are selected.
Post Reply