0

I have a production web server that makes sites to be very slow when load for first time. After the first time all connections are normal and fast.

In the following screen you can see the first test I have run for a random site in my server:

enter image description here

and here you can see the result of the second time request:

enter image description here

As you can see there is a big change in the second load of the same page.

Here is the page load time graph:

enter image description here

My problem is that I don't really know anything about Red Had Linux server, and also I don't know where can I start.

Can somebody to help me ? I like to find out the solution for the long time "wait" in connection.

I know that my question is very minimal, but you can always ask me to give you information about the server.

MadHatter
  • 78,442
  • 20
  • 178
  • 229
KodeFor.Me
  • 209
  • 3
  • 5
  • 14

1 Answers1

2

Since you don't provide this information I will assume you are using mysql. There are many things to check, but you can start with :

  1. Download and execute this perl script. Read and understand the suggestions it outputs, it will help optimize your db.
  2. Find slow db queries. Unoptimized db queries can take much time to execute the first time and then are recovered from the cache, thus the difference. Check the slow query log and look for max execution time.
  3. Another one is name resolution on the db side, are you doing name resolution on db connect (check this to make sure) ?
drcelus
  • 1,233
  • 4
  • 14
  • 27