Support the ongoing development of Laravel.io →
posted 10 years ago
Database
Last updated 2 years ago.
0

Found the problem, i changed from localhost to 127.0.0.1 in the db configuration

http://stackoverflow.com/questions/12832207/laravel-application-very-slow-when-connecting-to-the-database

Last updated 2 years ago.
0

Thanks! I have noticed significant increase in speed as well for my local windows 7 environment.

Question: does this solution also work/apply to Linux VPS environment? or is this specific to local windows environment?

Last updated 2 years ago.
0

This is a Windows environment problem in general. Later versions of windows have localhost disabled in their host config requiring it to look it up over the DNS every time. If you look in your host file you should see something like:

#   127.0.0.1       localhost
#   ::1             localhost

Remove the # in front of it and everything should be speedy even if you use localhost instead of 127.0.0.1.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.