Fix: Restore website functionality - all pages and APIs working
This commit is contained in:
24
backend/test_healthcheck.js
Normal file
24
backend/test_healthcheck.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const db = require('./config/database');
|
||||
|
||||
console.log('Testing healthCheck...');
|
||||
const timeout = setTimeout(() => {
|
||||
console.log('TIMEOUT - healthCheck() is hanging!');
|
||||
console.log('Pool stats:', {
|
||||
total: db.pool.totalCount,
|
||||
idle: db.pool.idleCount,
|
||||
waiting: db.pool.waitingCount
|
||||
});
|
||||
process.exit(1);
|
||||
}, 5000);
|
||||
|
||||
db.healthCheck()
|
||||
.then(result => {
|
||||
clearTimeout(timeout);
|
||||
console.log('SUCCESS:', JSON.stringify(result, null, 2));
|
||||
process.exit(0);
|
||||
})
|
||||
.catch(e => {
|
||||
clearTimeout(timeout);
|
||||
console.log('ERROR:', e.message);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user