[MXS-3298] DNS server failure crashes Maxscale Created: 2020-11-13 Updated: 2024-01-29 Resolved: 2021-09-02 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Core |
| Affects Version/s: | 2.4.13 |
| Fix Version/s: | 2.5.16 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Kyle Joiner (Inactive) | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
During a primary DNS failure Maxscale does not roll over to secondary and crashes with a system timeout. cofigured: When DNS1 went offline: 2020-11-11 21:09:10 notice : Server 'server-2' version: 10.3.27-MariaDB-log |
| Comments |
| Comment by markus makela [ 2020-11-24 ] |
|
This happens because getaddrinfo is a blocking system call. The proper way to do this would be to either do it via the asynchronous getaddrinfo_a or use the MaxScale threadpool for it. |
| Comment by markus makela [ 2021-08-30 ] |
|
Looking at this StackOverflow issue, we see that this can actually be fixed by configuring a lower timeout for the address resolver. If the default timeout of five seconds and two attempts is used, this should not cause problems. If the timeout is set to a higher value, the SystemD watchdog timeout should probably can be adjusted to avoid a timeout. |
| Comment by markus makela [ 2021-08-31 ] |
|
Even if the timeout is configured to a high value, the watchdog timeout can be avoided with a few changes in code. |