Problem with Wordpress and Mysql connection.

Asked

Viewed 72 times

0

All right, guys

I developed a news portal for the company I work for and on this portal I have an average of 500 thousand monthly accesses.

I’m having for some time many problems with my site.

The same has a huge database (4GB) as it has news since 2010. When posting a relevant matter that has many simultaneous accesses the same of database error.

Today I tried using Google cloud Mysql served. I migrated the database is turned the site to connect on this basis in Google. Except that it got worse at the time birds gave time to database error. On the same server I put a simple database connection in PHP to test the connection and when wordpress reported connection error in the database the php script connected normally.

What could be going on? In Google cloud there was no overhead

  • What error specifically are you having? From how many simultaneous accesses more or less the bank starts to give this error?

  • Around 800 simultaneous accesses. But I’ve had problems with less ... Today when I tested the Mysql of google cloud nor was it necessary, with much less access gave error connection to database

  • Do you have a log of which queries are being made at each access? It is very likely that you have one or two very inefficient queries that are becoming the bottleneck there. 800 hits shouldn’t take down a server.

  • If you don’t have Mysql access, install this plugin and get the list of queries that are generated when you access an article: https://br.wordpress.org/plugins/debug-bar/

  • I have in my theme queries to assemble this theme. Several queries are spending 1.316,6ms (1.31656813622s). In these queries I get different posts (with the clause not IN)

  • Using NOT IN and Subqueries in general already greatly reduces the efficiency of queries, has several questions on Soen and other sites regarding 1.3s for each query is impracticable.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.