Two deploy errors trying to deploy a vanilla remix + blues + postgres app

I’ve followed the instructions exactly to setup the Remix Blues Stack - GitHub - remix-run/blues-stack: The Remix Stack for deploying to Fly with PostgreSQL, authentication, testing, linting, formatting, etc.

I am getting errors in the first deploy.

  • 2023-05-09T18:22:56.117 app[3d8d501f43d189] iad [info] You may have to run ${S(“prisma generate”)} for your changes to take effect.`
  • 2023-05-09T18:22:56.117 app[3d8d501f43d189] iad [info] Error: Can’t reach database server at iad.xxxxx-db.flycast:5432

I haven’t made any code changes.

Here’s a full backtrace

2023-05-09T18:22:56.117 app[3d8d501f43d189] iad [info] You may have to run ${S("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return r}parseEngineResponse(r){if(!r)throw new ie("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(r)}catch{throw new ie("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}convertDatasources(r){let n=Object.create(null);for(let{name:i,url:o}of r)n[i]=o;return n}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(),this.QueryEngineConstructor=this.library.QueryEngine);try{let r=new WeakRef(this);this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:process.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides,logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:this.engineProtocol},n=>{r.deref()?.logger(n)}),Qs++}catch(r){let n=r,i=this.parseInitError(n.message);throw typeof i=="string"?n:new G(i.message,this.config.clientVersion,i.error_code)}}}logger(r){let n=this.parseEngineResponse(r);if(!!n){if("span"in n){this.config.tracingHelper.createEngineSpan(n);return}n.level=n?.level.toLowerCase()??"unknown",up(n)?this.logEmitter.emit("query",{timestamp:new Date,query:n.query,params:n.params,duration:Number(n.duration_ms),target:n.module_path}):cp(n)?this.loggerRustPanic=new me(this.getErrorMessageWithLink(`${n.message}: ${n.reason} in ${n.file}:${n.line}:${n.column}`),this.config.clientVersion):this.logEmitter.emit(n.level,{timestamp:new Date,message:n.message,target:n.module_path})}}getErrorMessageWithLink(r){return js({platform:this.platform,title:r,version:this.config.clientVersion,engineVersion:this.versionInfo?.commit,database:this.config.activeProvider,query:this.lastQuery})}parseInitError(r){try{return JSON.parse(r)}catch{}return r}parseRequestError(r){try{return JSON.parse(r)}catch{}return r}on(r,n){r==="beforeExit"?this.beforeExitListener=n:this.logEmitter.on(r,n)}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Ne(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let r=async()=>{Ne("library starting");try{let n={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(n)),this.libraryStarted=!0,Ne("library started")}catch(n){let i=this.parseInitError(n.message);throw typeof i=="string"?n:new G(i.message,this.config.clientVersion,i.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",r),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Ne("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let r=async()=>{await new Promise(i=>setTimeout(i,5)),Ne("library stopping");let n={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(n)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Ne("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",r),this.libraryStoppingPromise}async getDmmf(){await this.start();let r=this.config.tracingHelper.getTraceParent(),n=await this.engine.dmmf(JSON.stringify({traceparent:r}));return this.config.tracingHelper.runInChildSpan({name:"parseDmmf",internal:!0},()=>JSON.parse(n))}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(r){return this.library?.debugPanic(r)}async request(r,{traceparent:n,interactiveTransaction:i}){Ne(`sending request, this.libraryStarted: ${this.libraryStarted}`);let o=JSON.stringify({traceparent:n}),s=JSON.stringify(r);try{await this.start(),this.executingQueryPromise=this.engine?.query(s,o,i?.id),this.lastQuery=s;let a=this.parseEngineResponse(await this.executingQueryPromise);if(a.errors)throw a.errors.length===1?this.buildQueryError(a.errors[0]):new ie(JSON.stringify(a.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:a,elapsed:0}}catch(a){if(a instanceof G)throw a;if(a.code==="GenericFailure"&&a.message?.startsWith("PANIC:"))throw new me(this.getErrorMessageWithLink(a.message),this.config.clientVersion);let l=this.parseRequestError(a.message);throw typeof l=="string"?a:new ie(`${l.message}

2023-05-09T18:22:56.117 app[3d8d501f43d189] iad [info] ^

2023-05-09T18:22:56.117 app[3d8d501f43d189] iad [info] Error: Can't reach database server at `iad.xxxxx-db.flycast`:`5432`

2023-05-09T18:22:56.117 app[3d8d501f43d189] iad [info] Please make sure your database server is running at `iad.xxxxx-db.flycast`:`5432`.

This is a known issue, please delete this line in app/db.server.ts:

Thanks! That was it.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.