I
I
Inter Carpenter2014-11-27 18:59:21
MySQL
Inter Carpenter, 2014-11-27 18:59:21

Does the database crash during a DDOS attack Yii framework?

Hello everyone
There is a site written in Yii.
There is a dedicated machine for hosting, the server is monitored by the admin.
But when ddos ​​only 100-200 bots, the server database falls off
. Error: Cdbconnection Failed To Open The Db Connection
Moreover, requests go to the main page. And the main page uses 2 requests to the database, and then it throws them into the cache for 10 minutes
. And the database still disappears, apparently the script passes authorization in the database, how to disable it if there are no requests and there is data in the cache
Here is a small log [ Yii ver: 1.1.15 ] [ Memory: 3364.52Kb ] [ Time: 0.084 ] [ DB Query: 0 ] [ App Log ]

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexander Aksentiev, 2014-11-27
@Sanasol

See database logs.
Maybe the problem is the number of connections?

X
xmoonlight, 2014-11-27
@xmoonlight

persistent connection through p: host (mysqli), then check the number of connections to the database and sleep well.

E
evil0o, 2014-11-27
@evil0o

See database logs.

P
Puma Thailand, 2014-11-28
@opium

Actually, the admin should decide this, 100-200 bots are not ddos, this is a schoolboy dabbles in programming.

A
Alexander, 2014-11-28
@SashaSkot

The basis falls most likely because of a lack of memory. Configure the web server and DBMS for the number of threads - make them less than simultaneously running. Enable DB caching

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question