[CONJS-242] mariadb.createPool: UncaughtException error Created: 2023-02-24 Updated: 2023-03-01 Resolved: 2023-03-01 |
|
| Status: | Closed |
| Project: | MariaDB Connector/node.js |
| Component/s: | pool |
| Affects Version/s: | 3.1.0 |
| Fix Version/s: | 3.1.1 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Rino Rabe | Assignee: | Diego Dupin |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | crash | ||
| Environment: |
node@19.6.0 MariaDB SQL server in a docker container. Tested with both node & nodemon. OS: Windows 10 |
||
| Description |
|
If Node w/mariadb connector & mariadb server losses connection between them, an 'UncaughtException' error will happen. Maybe I'm too new at this, but it seems like there might be an error in the createPool. Desire is to catch the error and let the pool try to reconnect in X time. Assuming "ClientOptions" are valid and MariaDB server is running, the following will create a pool in Node.js: That is working, but if I simulate that the MariaDB server dies/losing connection (i.e. stops the docker container): I have tried to listen to events:
Detailed error message: Error: connect ECONNREFUSED ::1:3306 |
| Comments |
| Comment by Rino Rabe [ 2023-02-24 ] |
|
Setting the priority to 'Minor' as I've succesfully managed to use events to intercept the crash error (and handle it). |
| Comment by Diego Dupin [ 2023-03-01 ] |
|
Closing it dupplicate of About minor, you're kind, i've set it as a blocker, since crashing application is serious, even if workaround is easy to implement. |