By engbamlhes
Hello everybody
i have issue with my Laravel project .
now i have deploy every thing to online
the issue is when i am trying to get my API its giving me 500 Error and when i checked the log i got the below logs
[db] [2021-07-27 13:32:43] postgresql-12.service [14-1] pid=7152,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [db] [2021-07-27 13:32:43] postgresql-12.service [15-1] pid=7152,user=postgres,db=db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=db application_name=do-pruned [db] [2021-07-27 13:32:43] postgresql-12.service [16-1] pid=7152,user=postgres,db=db,app=do-pruned,client=[local] LOG disconnection: session time: 0:00:00.007 user=postgres database=db host=[local] [db] [2021-07-27 13:32:43] postgresql-12.service [14-1] pid=7153,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [db] [2021-07-27 13:32:43] postgresql-12.service [15-1] pid=7153,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb application_name=do-pruned [db] [2021-07-27 13:32:43] postgresql-12.service [16-1] pid=7153,user=postgres,db=defaultdb,app=do-pruned,client=[local] LOG disconnection: session time: 0:00:00.010 user=postgres database=defaultdb host=[local] [db] [2021-07-27 13:32:53] postgresql-12.service [14-1] pid=7165,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [db] [2021-07-27 13:32:53] postgresql-12.service [15-1] pid=7165,user=postgres,db=db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=db application_name=do-pruned [db] [2021-07-27 13:32:53] postgresql-12.service [16-1] pid=7165,user=postgres,db=db,app=do-pruned,client=[local] LOG disconnection: session time: 0:00:00.010 user=postgres database=db host=[local] [db] [2021-07-27 13:32:53] postgresql-12.service [14-1] pid=7166,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [db] [2021-07-27 13:32:53] postgresql-12.service [15-1] pid=7166,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb application_name=do-pruned [db] [2021-07-27 13:32:53] postgresql-12.service [16-1] pid=7166,user=postgres,db=defaultdb,app=do-pruned,client=[local] LOG disconnection: session time: 0:00:00.011 user=postgres database=defaultdb host=[local]
so what is the issue exactly i need to know as i can see its between the DB but i don’t know the solution
Regards
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
It looks like that you need to make sure that you’ve specified the correct database credentials in your .env file.
If you are using a Droplet, you can follow the steps on how to do that here:
In case that you are using the App platform you could take a look at this answer here that shows how you could add your database details as env variables:
Let me know how it goes! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.