
By Andreas Grabner | Article Rating: |
|
June 23, 2013 01:00 PM EDT | Reads: |
9,486 |

In a previous post we showed how we hooked up our blog's WordPress application with the new Compuware APMaaS offering. Since WordPress is a PHP application we use PurePath for PHP to monitor it. We highlighted that we got an alert about a response time violation on some of our blog posts - which is shown in the following screenshot.
Dynamic Baselining detects a significant violation of the baseline during a 4.5 hour period last night
In this follow-up article I want to show you how we get to the root cause of this problem which turns out to be a third-party WordPress PHP plugin that detects Bad Requests including requests from Bots that try to put spam messages in blog comments.
Step 1: See PHP Performance Hotspots
For the selected time-frame, we open the Response Time Hotspot dashboard. This shows which layer of the PHP Application has the highest performance contribution.
The high-level performance hotspot shows that most of the time is spent in core PHP functionality.
Step 2: Pinpoint the problematic method
A click on the PHP layer shows us that the Sleep function is the biggest contributor to this performance hotspot:
Turns out it is the Sleep function that gets called from one of the plugins we use to identify Bad Requests.
Step 3: Identify the actual request
Let's have a look at one of the transactions where we get to see where the sleep method is actually called:
We see where the plugin detects the bad behavior and also the log message it writes to MySQL.
We also get access to the web request details such as IP Address, User Agent or actual URL and Query String:
The details show origin information about this bad request, e.g: IP, User Agent, URL and Query String
Analysis: Lots of Bad Requests reduces WordPress performance
The Bad Behavior Plugin does a good job in preventing these bots from posting spam messages. What's interesting though is their approach of putting the request to sleep for two seconds. If we have a lot of parallel bad requests we have a lot of threads that are blocked in wait. This will impact "real" users who want to access the blog as the web server might not have any available active threads. A different approach would help. If you have a suggestion for a better way to handle bad requests to avoid the blocked threads issue, let us know in the comments.
If you want to know more about performance management for PHP check out the blog from Klaus on Exploring the PHP World with PurePath Technology. If you are an existing Compuware APM Customer check out our dynaLearn Webinar on First Steps with PurePath for PHP.
Published June 23, 2013 Reads 9,486
Copyright © 2013 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Andreas Grabner
Andreas Grabner has been helping companies improve their application performance for 15+ years. He is a regular contributor within Web Performance and DevOps communities and a prolific speaker at user groups and conferences around the world. Reach him at @grabnerandi
![]() Dec. 31, 2017 12:00 PM EST Reads: 1,500 |
By Pat Romanski ![]() Dec. 30, 2017 11:00 AM EST Reads: 1,367 |
By Pat Romanski ![]() Dec. 30, 2017 08:30 AM EST Reads: 14,196 |
By Liz McMillan ![]() Dec. 29, 2017 12:00 PM EST Reads: 2,543 |
By Liz McMillan ![]() Dec. 29, 2017 08:00 AM EST Reads: 2,593 |
By Pat Romanski ![]() Dec. 28, 2017 02:00 PM EST Reads: 3,390 |
By Liz McMillan ![]() Dec. 24, 2017 01:45 PM EST Reads: 1,568 |
By Elizabeth White ![]() Dec. 23, 2017 10:00 AM EST Reads: 1,459 |
By Elizabeth White ![]() Dec. 22, 2017 11:00 AM EST Reads: 1,226 |
By Elizabeth White ![]() Dec. 18, 2017 03:45 PM EST Reads: 2,590 |
By Elizabeth White ![]() Dec. 18, 2017 01:30 PM EST Reads: 2,574 |
By Elizabeth White ![]() Dec. 18, 2017 01:00 PM EST Reads: 4,376 |
By Liz McMillan ![]() Dec. 17, 2017 04:00 PM EST Reads: 1,571 |
By Pat Romanski ![]() Dec. 17, 2017 02:00 PM EST Reads: 1,650 |
By Elizabeth White ![]() Dec. 17, 2017 10:00 AM EST Reads: 1,720 |
By Liz McMillan ![]() Dec. 15, 2017 11:00 AM EST Reads: 2,569 |
By Elizabeth White ![]() Dec. 14, 2017 04:00 PM EST Reads: 1,700 |
By Liz McMillan ![]() Dec. 14, 2017 11:45 AM EST Reads: 1,768 |
By Elizabeth White ![]() Dec. 14, 2017 11:00 AM EST Reads: 1,766 |
By Pat Romanski ![]() Dec. 13, 2017 02:00 PM EST Reads: 1,512 |