[CONJ-435] "All pipe instances are busy" exception on multiple connections to the same named pipe Created: 2017-02-23 Updated: 2017-03-06 Resolved: 2017-03-06 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.4.6 |
| Fix Version/s: | 1.5.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Philipp Kapfer | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows |
||
| Issue Links: |
|
||||||||
| Description |
|
We configured the MariaDB server and Connector/J to attempt connections via named pipe. In parallelized unit tests, multiple threads concurrently access different databases via this named pipe. In some cases, creating a new connection fails, because the server didn't yet handle the previous connection attempt. This results in the FileNotFoundException below. According to the MSDN, this is a standard case and has to be handled by the client by trying the connection again after a backoff time. Such a mechanism was already implemented by another open-source JDBC driver, where a template for a Connector/J patch is readily available.
|
| Comments |
| Comment by Philipp Kapfer [ 2017-02-23 ] |
|
Further investigation showed that a working fix isn't as trivial as depicted in jDTS. To react on this specific error case, the exception message has to be parsed, which is automatically localized by the OS. I see two possible fixes for this:
|
| Comment by Diego Dupin [ 2017-02-23 ] |
|
Hi philipp. Right, ERROR_PIPE_BUSY cannot be handle properly in java (without access to native implementation of WaitNamedPipe method). |