Amazon EC2, mysql aborting even after adding swap space - mysql

I have set up a micro instance server on amazon EC2.
mysql server fails frequently and due to which I get 'error establishing a database connection' whenever I access my website. To make my website work again, I have to restart mysqld. Here is the error log. Please click the link as i just opened the account on stackoverflow.
I read through other threads here for the same kind of error and accordingly I added a swapfile of 3G but I am still getting the same memory allocation error. Here is my swapfile.
I am not a technical person so please help me figure out how to solve this problem.

Related

Cloud SQL crashed related to connections and threading issues, won't restart ("An unknown error occurred")

Conclusion: Nevermind, GCP was down ROFL
I have a MYSQL instance on cloud SQL and it has some read and write operations going on at all times, but neither the CPUs nor the memory is clogged or overloaded, I specifically checked.
It had been getting thread related issues for the past few weeks but this time it completely crashed and won't restart, every time I try and restart, it just says "An unknown error occurred"
These are the latest error logs from right before it crashed:
[Server] Can't create thread to handle new connection(errno= 11)"
and
[connection_h] Error log throttle: 742 'Can't create thread to handle new connection' error(s) suppressed"
Yesterday we moved the old data into a fresh new db and it was running well, but today it seems have been getting these thread related issues again and it crashed and won't restart.
Previously I tried to increase the ulimit by changing the limits.conf file but ulimit wasn't changing. Could that be the issue? Maybe a reconfiguration is needed?
BTW, max_connections flag is set to 10000, much higher than the default.
What can I do now? can't start the machine nor can I investigate. Feel free to ask anything.
Update:
I tried cloning the db but even clones are showing "unknown error"

Communication link failure: 1047 WSREP has not yet prepared node for application use in

We had a three-node cluster with MariaDB 10.4. We had an outage and the servers all rebooted with one having an irrecoverable network issue at the time.
We set up another server and added it to the cluster as a third member later.
However, ever since that, we have constantly been getting this error every now and then.
*3287799 FastCGI sent in stderr: "PHP message: An Error occurred while handling another error:
PDOException: SQLSTATE[08S01]: Communication link failure: 1047 WSREP has not yet prepared node for application use in /var/....yii2/db/Command.php:1293
In order to fix this issue, we turned down all three nodes one by one and then re-initialized the cluster, even with a new cluster name and all.
The first one was started with "galera_new_cluster" and the remaining two were added to this cluster. However, we still kept getting the same error intermittently.
The workaround at mariadb galera - Error when a node shutdown ERROR 1047 WSREP has not yet prepared node for application use was followed but that didn't do anything, as expected.
Next, what we did is set up a single fresh server and installed the new 10.5.X MariaDB server on it. Took backup from the old cluster using mariabackup and restored it onto this new single server.
This single server was set up as a new cluster with fresh details and everything. We wanted to run it as a single node cluster to make sure if the error still persisted. Oddly enough, the error is still there and it comes off every half an hour or so.
Has anyone got any clue what could be the reason for this weird issue we're facing? Currently, we don't know what exactly is the issue which is why we're facing a hard time solving it.
Any help would be greatly appreciated.
Update:
We turned off galera on this single-node cluster and ran it as a simple stand-alone mariadb server. However we still go the same errors in our web-server's logs. This is bonkers.
Any idea? Anyone?

DATABASE - Is phpMyAdmin.co down?

I'm working on a project with a DB and whe are using phpMyAdmin.co for administration and I'm not able to connect with my DB administration (phpMyadmin) anymore (yesterday was the last time it worked).
I have tried to reach my host sql7 and phpMyadmin.co and they both didn't work. They where offline.
I've already looked here for the error "Too many connection" and they say I need to adjust something in my administration. But since I can't reach phpMyadmin It's not possible the do that.
Error: Authentication to host 'sql7.freemysqlhosting.net' for user 'sql7269519' using method 'mysql_native_password' failed with message: Too many connections'
Does anyone know if there are some issues with phpMyadmin.co or is there a problem with my code.

Increase the amount of connections in my server MySQL

I have aplications that connect to a remote server (MySQL 5.5 on Windows Server 2012), at first I started receiving "too many connections" message which I solved by increasing MAX_CONNECTION value in my.inf to 500, then I start getting "can't create new thread" message so I decrease decrease timeouts to avoid idle connections using a socket, which didn't completely work. Now I get odd messages like 'file not found', as soon as I restart the service I stop getting the messages and everything works correctly.
The problem occurs when the server reaches around 170 connections at the same time.
Is there some configuration I'm missing?, I really don't know what info you need to give me a hint to fix this. I mean, there are servers that accept a lot morw of connections at the same time, right? waht I'm missing.
RAM and CPU of the system dosen't reach 35-40% at max connections (170).
Edit: Error occur at 2 'places', when running a query or at the attempt of conennection, it's like the MySQL service rejects the attempt. VB6 is the language used in the client app (ODBC connector). The app opens, executes and closes the connection.
Note: I have full control over client app and server config.

MySQL localhost: "connection refused"

sorry for this post that it might be repeated, but I could not quite figure out from the other posts still.
I am unable to log on mysql localhost database, and the server is down says mysql#localhost:3366 - Refusing Connections. In mysql workbench start/shutdown mysql server, it is saying the database server instance is unknown (with start server button grayed out) and refreshing the status doesn't help.
Also, the mysql server should always be running automatically in the background whenever PC is restarted, but it is not showing in the services now.
when I try to execute mysqld from cmd, it just shuts down the server. And responds with
-"The Innodb memory heap is disabled"
-"the system tablespace must be writeable"
-"InnoDB init function returned error"
-"InnoDB registration as a storage engine failed"
Anybody has a solution to this? Thanks much!
Install it. Re-install it, if you're convinced it was already installed. The fact that it isn't even listed in the services suggests otherwise however. If it was installed but wouldn't start it would still show up, but not as started.