Website pages very slow to load on first access
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 :
- Download and execute this perl script. Read and understand the suggestions it outputs, it will help optimize your db.
- 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.
- Another one is name resolution on the db side, are you doing name resolution on db connect (check this to make sure) ?