paritytech / polkassembly

Polkassembly now has a new home:
https://github.com/Premiurly/polkassembly
Apache License 2.0
29 stars 37 forks source link

On auth-server, yarn start throw this error #1125

Closed yashirooooo closed 3 years ago

yashirooooo commented 3 years ago
$  yarn migrate
yarn run v1.22.10
$ knex migrate:latest
Requiring external module ts-node/register
KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
    at Client_PG.acquireConnection (E:\code\polkassembly\auth-server\node_modules\knex\lib\client.js:347:26)
    at async Promise.all (index 1)
error Command failed with exit code 1.

I have started a postgresql and redis on a server, and can guarantee the connection,What should i do

niklabh commented 3 years ago

Check if this helps https://github.com/knex/knex/issues/2820#issuecomment-481710112

yashirooooo commented 3 years ago

thanks a lot, but when I tried to modify the configuration through knexfile.tx, an abnormal type error was reported. Is it because a wrong version of knex was installed?

Type '{ min: number; max: number; propagateCreateError: false; }' is not assignable to type 'PoolConfig'.
  Object literal may only specify known properties, and 'propagateCreateError' does not exist in type 'PoolConfig'.ts(2322)
index.d.ts(1674, 5): The expected type comes from property 'pool' which is declared here on type 'Config<any>'
yashirooooo commented 3 years ago

I modified the version of knex to ^0.21.1, and the following error was thrown

$  yarn start
yarn run v1.22.10
$ yarn tsc && yarn migrate && node build/src/index.js
$ tsc --resolveJsonModule
$ knex migrate:latest
Requiring external module ts-node/register

#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 000000C46DCFF110
 1: 00007FF638011DDF napi_wrap+109135
 2: 00007FF637F44F7F std::basic_ostream<char,std::char_traits<char> >::operator<<+56895
 3: 00007FF638B835E2 V8_Fatal+162
 4: 00007FF6386C7928 v8::internal::ItemParallelJob::NumberOfTasks+3320
 5: 00007FF6386C7B7D v8::internal::ItemParallelJob::NumberOfTasks+3917
 6: 00007FF6386C81E3 v8::internal::ItemParallelJob::NumberOfTasks+5555
 7: 00007FF638705E82 v8::internal::ItemParallelJob::Task::RunInternal+18
 8: 00007FF637F4791D std::basic_ostream<char,std::char_traits<char> >::operator<<+67549
 9: 00007FF63805643D uv_poll_stop+557
10: 00007FF638E26ED0 v8::internal::compiler::RepresentationChanger::Uint32OverflowOperatorFor+397712
11: 00007FFEE37B7034 BaseThreadInitThunk+20
12: 00007FFEE53A2651 RtlUserThreadStart+33
error Command failed with exit code 3221225477.
yashirooooo commented 3 years ago

i downgrade my node vesion to 12.18.2 solved this problem, thanks