Hacker News new | ask | show | jobs
by JohnQUnknown 4423 days ago
Hello again and thanks for your responses, I have been analyzing the server performance and checked logs for when CPU peaks and I know now, as I previously stated, that the issue is when that particular plugin (Traffic Commando) runs.

I have been analyzing its code and it's not optimized at all (not that I was surprised when I found out), it seems to not have any kind of limitant on how many posts it creates on the wordpress site (it creates posts to the DB) and it hogs up all resources. I have convinced my friend/client that the best way is to avoid using that plugin for now until it is optimized (by me, obviously... sigh), and it seems like we will start using some kind of caching system as well as CDNs to leverage the toll the sites take with traffic (I'm not really worried about that).

All in all, I guess it'll come up as a total rewrite of the plugin he is using and implementing a caching system along with a CDN system for static files as suggested in your comments.

Thanks a lot again for all your help!

1 comments

You could run the plugin as a cron job on off-peak traffic hours.
I actually did that, I disabled the wp-cron function and switched to crontab. I am currently monitoring the server to see if this helps or if the issue is somewhere else.

Thanks for the suggestion!