Failed to create connection: SQLSTATE[HY000] [1040] Too many connections after upgrading to 1.4.0
- 0
- Self Hosted

Get this error when attempting to log in at WebUI after migration; {"message":"Error: Error handler had an error: Failed to create connection: SQLSTATE[HY000] [1040] Too many connections","code":500,"file":"usrsrccodevendorutopia-phpframeworksrcApp.php","line":551,"trace":[{"file":"usrsrccodevendorutopia-phpframeworksrcApp.php","line":673,"function":"execute","class":"UtopiaApp","type":"->","args":[{},{},{}]},{"file":"usrsrccodeapphttp.php","line":258,"function":"run","class":"UtopiaApp","type":"->","args":[{},{}]}],"version":"1.4.0"}
One error was displayed during installation (Google analytics is blocked across entire network) Running "docker compose up -d --remove-orphans --renew-anon-volumes"
[Error] Google Analytics Error: [Error] Type: Exception [Error] Message: Failed to connect to www.google-analytics.com port 443 after 1 ms: Couldn't connect to server [Error] File: /usr/src/code/vendor/utopia-php/analytics/src/Analytics/Adapter.php [Error] Line: 180
Appwrite installed successfully

Follow this

Failed to create connection: SQLSTATE[HY000] [1040] Too many connections after upgrading to 1.4.0

Partially solved - now stuck on 500 error

For that part check this

Made change to maria conf, additional error now thrown by service worker, but still 500

(i also took down and restarted the whole stack)

Also tried on 127.0.0.1 - which did bring up the login prompt - but get 500 when trying to display dashboard

What are the logs from the main Appwrite

docker logs appwrite


You'll need to clear the redis cache

Like so

Different errors, still 500

Can you try in incognito?

It's just a gash local install, so I can just wipe it - unless you want to investigate cause further?

What's easy for you

Incognito gives same problem

I will just wipe it

I did the following and it works for me
cd appwrite/
docker exec -it appwrite-redis redis-cli
flushall
exit
docker compose up -d --remove-orphans --renew-anon-volumes
docker compose exec appwrite migrate

thanks @Binyamin

<:appwriteupvote:899677724615016528>

it works and then it fail with another error Error: Error handler had an error: Pool 'console' is empty
. I notice in the new .env
file we have _APP_DOMAIN_FUNCTIONS=
but it was empty, so I updated it to: _APP_DOMAIN_FUNCTIONS=localhost
and now the app is running except for the functions Tab in the console, still shows 500

@Binyamin I didnt get round to wiping local install last night, then spotted that 1.4.1 was out, did a local migration to 1.4.1, and it came up without any 500s. Many thnaks
Recommended threads
- tablesDB scopes are working for newest v...
I am trying to setup local Appwrite instance for testing and managed to pull functions from cloud, now trying to use `appwrite push` to localhost for each of my...
- Unable to Create Relation Attribute in A...
Hello, I’m running a self-hosted Appwrite v1.7.4 instance on my server. I want to create a relation attribute between two collections in the console, but the co...
- Having permission issues with imported s...
Hello, I have my self hosted project on a server, and i wanted to import the schema to my local machine dev instance so I used the json file from the server ...
