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
- email verification error??
Hey, I'm trying email verificacion with this signup implementation using deep links on iOS, but when creating the account I get this exception: Exception: Erro...
- Apple OAuth in SwiftUI
Any ideas why this error might be showing up when trying it sign in via apple in SwifUI? _Concurrency/CheckedContinuation.swift:196: Fatal error: SWIFT TASK CO...
- Unexpected File Persistence Across Appwr...
I'm encountering an issue where files created during an Appwrite Function execution persist across subsequent executions. Specifically, when a function writes a...
