Digital Ocean deployment error

Solved
klaudioz

Oct 3rd, 2022 08:19 PM

I'm getting the same issue with a totally new DigitalOcean account, after clicking the button to deploy. I've done: Click the Actions button -> Click on Force Rebuild + Redeploy -> Check the clear build cache, and I'm still getting the same error:

[2022-10-03 23:53:27] In Connection.php line 759: [2022-10-03 23:53:27] [2022-10-03 23:53:27] SQLSTATE[23503]: Foreign key violation: 7 ERROR: update or delete on table [2022-10-03 23:53:27] "roles" violates foreign key constraint "users_role_id_foreign" on table " [2022-10-03 23:53:27] users" [2022-10-03 23:53:27] DETAIL: Key (id)=(1) is still referenced from table "users". (SQL: delete [2022-10-03 23:53:27] from "roles") [2022-10-03 23:53:27] [2022-10-03 23:53:27] [2022-10-03 23:53:27] In Exception.php line 18: [2022-10-03 23:53:27] [2022-10-03 23:53:27] SQLSTATE[23503]: Foreign key violation: 7 ERROR: update or delete on table [2022-10-03 23:53:27] "roles" violates foreign key constraint "users_role_id_foreign" on table " [2022-10-03 23:53:27] users" [2022-10-03 23:53:27] DETAIL: Key (id)=(1) is still referenced from table "users". [2022-10-03 23:53:27] [2022-10-03 23:53:27] [2022-10-03 23:53:27] In PDOStatement.php line 117: [2022-10-03 23:53:27] [2022-10-03 23:53:27] SQLSTATE[23503]: Foreign key violation: 7 ERROR: update or delete on table [2022-10-03 23:53:27] "roles" violates foreign key constraint "users_role_id_foreign" on table " [2022-10-03 23:53:27] users" [2022-10-03 23:53:27] DETAIL: Key (id)=(1) is still referenced from table "users".

I've a 6-minutes video showing the process here: https://cln.sh/IgrKVogawD1gs1uo33my/

bobbyiliev

Oct 4th, 2022 02:04 AM

Hi there,

I just pushed a fix for this. Please pull the latest changes and do another deployment from scratch.

The problem was that there was a migrations job, that was trying to run db:seed each time, but this is only required once. With the last change, this should be sorted out but let me know how it goes!

Best,

Bobby

Report
1
wassem

Oct 4th, 2022 07:17 AM

After deploying the new build I'm getting

Screen Shot 2022-10-04 at 10.16.58 AM.png

klaudioz

Oct 4th, 2022 07:32 AM

Thank you Bobby. Right now the deployment process worked, but I'm getting: 419 PAGE EXPIRED trying to connect as an admin.

I noticed I get the same error, putting a wrong password. But if I change the email address from [email protected], it comes back to Sign in Below, cleaning the email address and password.

wassem

Oct 4th, 2022 07:43 AM

looks like its DB issue

[wave-db] [2022-10-04 14:40:00] postgresql-12.service [15-1] pid=12423,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:40:00] postgresql-12.service [14-1] pid=12424,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:00] postgresql-12.service [15-1] pid=12424,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db [wave-db] [2022-10-04 14:40:00] postgresql-12.service [16-1] pid=12424,user=postgres,db=wave-db,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.007 user=postgres database=wave-db host=[local] [wave-db] [2022-10-04 14:40:00] postgresql-12.service [14-1] pid=12425,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:00] postgresql-12.service [15-1] pid=12425,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:40:00] postgresql-12.service [16-1] pid=12425,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.007 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:40:00] postgresql-12.service [16-1] pid=12423,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.053 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:40:00] postgresql-12.service [14-1] pid=12426,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:00] postgresql-12.service [15-1] pid=12426,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db [wave-db] [2022-10-04 14:40:00] postgresql-12.service [16-1] pid=12426,user=postgres,db=wave-db,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.041 user=postgres database=wave-db host=[local] [wave-db] [2022-10-04 14:40:12] postgresql-12.service [14-1] pid=12483,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:12] postgresql-12.service [15-1] pid=12483,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:40:12] postgresql-12.service [14-1] pid=12484,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:12] postgresql-12.service [15-1] pid=12484,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db [wave-db] [2022-10-04 14:40:12] postgresql-12.service [16-1] pid=12484,user=postgres,db=wave-db,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.022 user=postgres database=wave-db host=[local] [wave-db] [2022-10-04 14:40:12] postgresql-12.service [14-1] pid=12485,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:12] postgresql-12.service [15-1] pid=12485,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:40:12] postgresql-12.service [16-1] pid=12485,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.049 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:40:12] postgresql-12.service [16-1] pid=12483,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.127 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:40:30] postgresql-12.service [14-1] pid=12579,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:30] postgresql-12.service [15-1] pid=12579,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:40:30] postgresql-12.service [14-1] pid=12580,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:30] postgresql-12.service [15-1] pid=12580,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db [wave-db] [2022-10-04 14:40:30] postgresql-12.service [16-1] pid=12580,user=postgres,db=wave-db,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.006 user=postgres database=wave-db host=[local] [wave-db] [2022-10-04 14:40:30] postgresql-12.service [14-1] pid=12581,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:30] postgresql-12.service [15-1] pid=12581,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:40:30] postgresql-12.service [16-1] pid=12581,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.005 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:40:30] postgresql-12.service [16-1] pid=12579,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.053 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:40:30] postgresql-12.service [14-1] pid=12582,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:30] postgresql-12.service [15-1] pid=12582,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db [wave-db] [2022-10-04 14:40:30] postgresql-12.service [16-1] pid=12582,user=postgres,db=wave-db,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.036 user=postgres database=wave-db host=[local] [wave-db] [2022-10-04 14:40:32] postgresql-12.service [14-1] pid=12598,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:32] postgresql-12.service [15-1] pid=12598,user=doadmin,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=doadmin database=defaultdb application_name=do-pruned [wave-db] [2022-10-04 14:40:32] postgresql-12.service [16-1] pid=12598,user=doadmin,db=defaultdb,app=do-pruned,client=[local] LOG disconnection: session time: 0:00:00.006 user=doadmin database=defaultdb host=[local] [wave-db] [2022-10-04 14:40:42] postgresql-12.service [14-1] pid=12645,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:42] postgresql-12.service [15-1] pid=12645,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:40:42] postgresql-12.service [14-1] pid=12646,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:42] postgresql-12.service [15-1] pid=12646,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db [wave-db] [2022-10-04 14:40:42] postgresql-12.service [16-1] pid=12646,user=postgres,db=wave-db,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.018 user=postgres database=wave-db host=[local] [wave-db] [2022-10-04 14:40:42] postgresql-12.service [14-1] pid=12647,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:40:42] postgresql-12.service [15-1] pid=12647,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:40:42] postgresql-12.service [16-1] pid=12647,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.053 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:40:42] postgresql-12.service [16-1] pid=12645,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.191 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:40:50] postgresql-12.service [14-1] pid=12694,user=[unknown],db=[unknown],app=[unknown],client=164.90.255.23 LOG connection received: host=164.90.255.23 port=44493 [wave-db] [2022-10-04 14:40:50] postgresql-12.service [14-1] pid=12696,user=[unknown],db=[unknown],app=[unknown],client=178.128.133.189 LOG connection received: host=178.128.133.189 port=60195 [wave-db] [2022-10-04 14:40:50] postgresql-12.service [14-1] pid=12695,user=[unknown],db=[unknown],app=[unknown],client=178.128.133.242 LOG connection received: host=178.128.133.242 port=55953 [wave-db] [2022-10-04 14:41:00] postgresql-12.service [14-1] pid=12740,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:00] postgresql-12.service [15-1] pid=12740,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:41:00] postgresql-12.service [14-1] pid=12741,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:00] postgresql-12.service [15-1] pid=12741,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db [wave-db] [2022-10-04 14:41:00] postgresql-12.service [16-1] pid=12741,user=postgres,db=wave-db,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.006 user=postgres database=wave-db host=[local] [wave-db] [2022-10-04 14:41:00] postgresql-12.service [14-1] pid=12742,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:00] postgresql-12.service [15-1] pid=12742,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:41:00] postgresql-12.service [16-1] pid=12742,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.006 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:41:00] postgresql-12.service [16-1] pid=12740,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.044 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:41:00] postgresql-12.service [14-1] pid=12743,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:00] postgresql-12.service [15-1] pid=12743,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db [wave-db] [2022-10-04 14:41:00] postgresql-12.service [16-1] pid=12743,user=postgres,db=wave-db,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.041 user=postgres database=wave-db host=[local] [wave-db] [2022-10-04 14:41:12] postgresql-12.service [14-1] pid=12805,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:12] postgresql-12.service [15-1] pid=12805,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:41:12] postgresql-12.service [14-1] pid=12806,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:12] postgresql-12.service [15-1] pid=12806,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db [wave-db] [2022-10-04 14:41:12] postgresql-12.service [16-1] pid=12806,user=postgres,db=wave-db,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.065 user=postgres database=wave-db host=[local] [wave-db] [2022-10-04 14:41:12] postgresql-12.service [14-1] pid=12807,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:12] postgresql-12.service [15-1] pid=12807,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:41:12] postgresql-12.service [16-1] pid=12807,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.017 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:41:12] postgresql-12.service [16-1] pid=12805,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.189 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:41:30] postgresql-12.service [14-1] pid=12901,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:30] postgresql-12.service [15-1] pid=12901,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:41:30] postgresql-12.service [14-1] pid=12902,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:30] postgresql-12.service [15-1] pid=12902,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db [wave-db] [2022-10-04 14:41:30] postgresql-12.service [16-1] pid=12902,user=postgres,db=wave-db,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.024 user=postgres database=wave-db host=[local] [wave-db] [2022-10-04 14:41:30] postgresql-12.service [14-1] pid=12903,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:30] postgresql-12.service [15-1] pid=12903,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:41:30] postgresql-12.service [16-1] pid=12903,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.020 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:41:30] postgresql-12.service [16-1] pid=12901,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.111 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:41:30] postgresql-12.service [14-1] pid=12904,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:30] postgresql-12.service [15-1] pid=12904,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db [wave-db] [2022-10-04 14:41:30] postgresql-12.service [16-1] pid=12904,user=postgres,db=wave-db,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.035 user=postgres database=wave-db host=[local] [wave-db] [2022-10-04 14:41:32] postgresql-12.service [14-1] pid=12916,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:32] postgresql-12.service [15-1] pid=12916,user=doadmin,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=doadmin database=defaultdb application_name=do-pruned [wave-db] [2022-10-04 14:41:32] postgresql-12.service [16-1] pid=12916,user=doadmin,db=defaultdb,app=do-pruned,client=[local] LOG disconnection: session time: 0:00:00.008 user=doadmin database=defaultdb host=[local] [wave-db] [2022-10-04 14:41:42] postgresql-12.service [14-1] pid=12973,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:42] postgresql-12.service [15-1] pid=12973,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:41:43] postgresql-12.service [14-1] pid=12974,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:43] postgresql-12.service [15-1] pid=12974,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db [wave-db] [2022-10-04 14:41:43] postgresql-12.service [16-1] pid=12974,user=postgres,db=wave-db,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.012 user=postgres database=wave-db host=[local] [wave-db] [2022-10-04 14:41:43] postgresql-12.service [14-1] pid=12975,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:41:43] postgresql-12.service [15-1] pid=12975,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG connection authorized: user=postgres database=defaultdb [wave-db] [2022-10-04 14:41:43] postgresql-12.service [16-1] pid=12975,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.015 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:41:43] postgresql-12.service [16-1] pid=12973,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.125 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:41:50] postgresql-12.service [14-1] pid=13012,user=[unknown],db=[unknown],app=[unknown],client=164.90.255.23 LOG connection received: host=164.90.255.23 port=34019 [wave-db] [2022-10-04 14:41:50] postgresql-12.service [14-1] pid=13013,user=[unknown],db=[unknown],app=[unknown],client=178.128.133.189 LOG connection received: host=178.128.133.189 port=45195 [wave-db] [2022-10-04 14:41:50] postgresql-12.service [14-1] pid=13014,user=[unknown],db=[unknown],app=[unknown],client=178.128.133.242 LOG connection received: host=178.128.133.242 port=39043 [wave-db] [2022-10-04 14:42:00] postgresql-12.service [14-1] pid=13064,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:42:00] postgresql-12.service [15-1] pid=13064,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db [wave-db] [2022-10-04 14:42:00] postgresql-12.service [14-1] pid=13065,user=[unknown],db=[unknown],app=[unknown],client=[local] LOG connection received: host=[local] [wave-db] [2022-10-04 14:42:00] postgresql-12.service [16-1] pid=13065,user=postgres,db=defaultdb,app=do-stats,client=[local] LOG disconnection: session time: 0:00:00.005 user=postgres database=defaultdb host=[local] [wave-db] [2022-10-04 14:42:00] postgresql-12.service [15-1] pid=13066,user=postgres,db=wave-db,app=[unknown],client=[local] LOG connection authorized: user=postgres database=wave-db

bobbyiliev

Oct 4th, 2022 08:00 AM

Hi @klaudioz,

Regarding the 419 error, make sure to only have 1 container for your web deployment.

Or if you want to have multiple containers, then you need to setup Redis and configure your session storage to Redis. That way the two containers will be able to share the sessions.

bobbyiliev

Oct 4th, 2022 08:01 AM

Hi @wassem,

In your case, I would just delete the whole deployment and start from scratch. That error that you are getting indicates that something has gone wrong during the deployment, but it is hard to tell without access to your project.

klaudioz

Oct 4th, 2022 08:06 AM

@bobbyiliev, I'm very sure I've only one container. I'm using a complete new and clean DO account.

bobbyiliev

Oct 4th, 2022 08:30 AM

Best Answer

If you go to your App -> then click on Settings -> click on the web component -> then go to Scaling, what is the Number of Containers value?

Report
1
klaudioz

Oct 4th, 2022 08:38 AM

Thank you. I learned something new.

One question. Why is it generating two containers?.

I couldn't find anything on the .do folder

bobbyiliev

Oct 4th, 2022 08:41 AM

Happy to hear that it is working now!

The number of containers is defined during the initial deployment when you get to the plan details. In there you can specify how many containers you want in order to scale up.

It will work well with multiple containers, but you will also have to add a Managed Redis cluster from DigitalOcean and set change the session environment from files to redis.

Let me know if you have any other questions!

klaudioz

Oct 4th, 2022 08:46 AM

Are you talking about SESSION_DRIVER = file ?

I just destroyed the app and I'd like to test it with redis.

bobbyiliev

Oct 5th, 2022 03:32 AM

Yes, you need to:

  1. Create a new Managed Redis database
  2. Get the details for that Redis instance and add then as environment variables to your App Platform
  3. Change the SESSION_DRIVER to redis so that Wave could connect to Redis and store the sessions there, that way the sessions will be shared between your containers and you can scale horizontally

Let me know how it goes!

klaudioz

Oct 6th, 2022 01:42 PM

I tried it but it didn't work. I'm getting a 500 SERVER ERROR.

These are the steps I followed:

  • Redis:

    • Created a new Managed Redis database.
    • Selected Redis v7, 15usd/mo, with eviction policy allkeys-lru.
    • Selected public network and add wave to the trusted sources.
    • Captured credentials to use on ENV variables.
  • Pushed Wave from zero:

    • Edited ENV variables with
      • SESSION_DRIVER = redis
      • REDIS_HOST = host
      • REDIS_PASSWORD = password
      • REDIS_PORT = port

Please let me know if I did something wrong or if there is any documentation available.

bobbyiliev

Oct 6th, 2022 11:44 PM

Hi there,

If you check the Laravel log and the web component logs do you see the actual error rather than the generic 500 error?

One thing that comes to my mind is that with the DigitalOcean managed Redis, the host needs to be specified with tls, eg:

REDIS_HOST=tls://your_redis_host.db.ondigitalocean.com
Load More Answers