B.D ERROR with closed application ports

2

I have an e-commerce and it is hosted in Configr and we have never had problems with it. This week the site began to become overwhelmed, even without traffic or anything, even falling several times.

The server's staff says that the application's ports are closed and they sent me this article: link

  

ATTENTION! It is important to check in the application code if there is   and closing the connections to the database. Otherwise, consumption   tends to increase.

Anyone who knows about Database could help me? Because I do not know anything

    
asked by anonymous 20.06.2018 / 13:42

1 answer

1

I do not know what your database is and I do not understand much of wordpress, but ...

A good programming practice is whenever you create an object, after using it you destroy it to free up memory. The same applies to database, when instantiating a connection with the bank you are consuming memory and processing of your server, and leaving it open you are constantly occupying that memory and wanting or not also generating some "memory garbage."

In my opinion, the right thing is whenever you need to do a search (select) or other operation as an insert or update, you instantiate a connection to the database, perform all necessary operations and then close the connection, thus freeing up memory and processing of your server and also the "memory garbage"

In your case, you should be instantiating the connection to the bank and always leaving it open, thus always generating a bit of "memory garbage" and other things that are getting in memory, weighing in your server and processes of it.

"Memory garbage" refers to, for example, data that the connection might create to optimize repeated tasks, and so forth.

    
20.06.2018 / 14:26