I have recently moved my laravel install from local to production server and it is super slow. On local machine it is super fast with local db, however, even on local when I connect to RDS it is insanely slow. I have the same data loaded in both. I have been using this database I am connecting to with our old platform fine with real quick response times. Any help would be greatly appreciated as I am not sure why it is so slow from Laravel but anything else that connects to it is super quick. It appears the first query is the slowest.
This may be a stupid question, but are you serving your site on an AWS instance, i.e.via EC2? Because if you are trying to use RDS from digital ocean or similar, the round-trip speed on that is going to be awful.
@Defrag I am using AWS EC2 for server and RDS from AWS as database. I added a local database to my EC2 instance and its flying less than 30ms response time, but when I use RDS it goes way over a second.
Ok, so I figured out the issue myself. I did not have the RDS in same geo-location as EC2. Once I discovered this I spooled up a new EC2 in the RDS zone and all is well. I hope this can help someone if they run across this post.
@cpdrenato It's probably best to post a new question with details specific to your issue instead of commenting on one from four years ago, but if it truly is the same issue, then the solution appears to have been establishing the EC2 and RDS instances in the same "geo-location." That might mean the same region or it might mean the same availability zone, but either way you could start with those. If that doesn't solve your problem, then start a new post and I'm sure that someone will be able to get you squared away quickly.