This was the most appropriate section I could find for this post, feel free to move if not.
My issue is that I maintain a few websites that are all built on WordPress (I know...), which for the most part is good at what it does. The servers are EC2 instances on AWS and the database is an RDS instance, also on AWS. Every now and again, I notice a huge increase in connections to the database coming from one of the websites.
What I want to know is, what counts as a connection? How is a connection actually established? At what point is a connection made? Hopefully finding this out will possibly help me understand how this issue is happening. I’ve been programming for over 15 years now so you’d think I should know this, well, I think I should know this.
The only users who should see dynamic content are logged in users—thus should be connected to the database, as they are editing content and viewing the pages as an admin. Any unauthorised users see static HTML pages generated by a plugin (W3TC), so I’m under the assumption that no connection is being made to the database there.
Due to this, I’ve ruled out the possibility of there being too many people viewing the website at 1 time. So I’m stuck thinking if it’s a plug-in being used that is faulty? Maybe WordPress itself is running jobs in the background that is causing it?
These spikes in connections are huge, I can often see 200-300+ connections just spawn out of nowhere. I have an alarm set up in RDS to email me when the connections are rising, that’s when I go to check and see that it’s coming from just one website.
Any help from you lovely bunch of nerds would be great. Thanks.
Edit: paging the expertise of the likes of @TesoMayn, @Ecko, @RastaLulz, @Sledmore and @Macemore here
My issue is that I maintain a few websites that are all built on WordPress (I know...), which for the most part is good at what it does. The servers are EC2 instances on AWS and the database is an RDS instance, also on AWS. Every now and again, I notice a huge increase in connections to the database coming from one of the websites.
What I want to know is, what counts as a connection? How is a connection actually established? At what point is a connection made? Hopefully finding this out will possibly help me understand how this issue is happening. I’ve been programming for over 15 years now so you’d think I should know this, well, I think I should know this.
The only users who should see dynamic content are logged in users—thus should be connected to the database, as they are editing content and viewing the pages as an admin. Any unauthorised users see static HTML pages generated by a plugin (W3TC), so I’m under the assumption that no connection is being made to the database there.
Due to this, I’ve ruled out the possibility of there being too many people viewing the website at 1 time. So I’m stuck thinking if it’s a plug-in being used that is faulty? Maybe WordPress itself is running jobs in the background that is causing it?
These spikes in connections are huge, I can often see 200-300+ connections just spawn out of nowhere. I have an alarm set up in RDS to email me when the connections are rising, that’s when I go to check and see that it’s coming from just one website.
Any help from you lovely bunch of nerds would be great. Thanks.
Edit: paging the expertise of the likes of @TesoMayn, @Ecko, @RastaLulz, @Sledmore and @Macemore here
Last edited: