0

I have a mediawiki page running on apache server on a Ubuntu EC2 on AWS. On first access of the website, it takes >20s for Initial connection (inspected in Chrome), after that the page works normally, even if I close the browser and reopen the URL. But if I delete all internet history, it becomes slow again on first load.

In AWS I have an ELB pointing to Route53 DNS, when I checked the access log of apache, nothing came up when the page idling on first access, after that the log showed normal access.

I'm not an expert in this so I don't know what's the issue, is it from the server or from AWS?

0

To see if it is because of your server, add %D to your apache's log config, that shows the time in microseconds for each logged HTTP request, for example:

LogFormat "%h %l %u %t \"%r\" %>s %b %D" profiling
CustomLog "/path/to/log/dir/access_log" 

Then check your access_log for example, requests that took more than 5 seconds:

awk '{ if ($NF > 5000000) { print $0 } }' < /path/to/log/dir/access_log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.