[MDEV-22228] How to troubleshoot: ERROR 1296 (HY000): Got error 122 'Cannot retrieve error message' from CONNECT Created: 2020-04-13 Updated: 2020-04-17 Resolved: 2020-04-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Chan Kar Heng | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hi. How can i troubleshoot error below?
Above error occurs if I select from a JDBC external table after using CONNECT engine JDBC tables to retrieve data for a day or 2. I have MariaDB-server-10.3.21-1.el7.centos.x86_64.rpm installed. & am using MariaDB 10.3.21. Thanks & best regards, |
| Comments |
| Comment by Chan Kar Heng [ 2020-04-15 ] |
|
Hi. Should I submit an issue instead? |
| Comment by Chan Kar Heng [ 2020-04-17 ] |
|
Self resolved. In summary, realized I tried using connect_xtrace=1023, but set it as a global variable & did not set it as a session variable, hence its effect was not immediate. After setting it as a session variable, was able to trace it to memory allocation failure. After using CONNECT engine JDBC tables to retrieve data for a day or 2, the error when selecting from a CONNECT storage engine JDBC external table was: I just recently noticed multiple of below lines appeared in mysqld.log too: So tried to troubleshoot again... Maybe I had previously used set global connect_xtrace=1023; which only changes settings for global but not current session. Hence this time tried set session connect_xtrace=1023 instead and relevant log entries below started appearing. So key was to set connect_xtrace=1023 for the session. My bad. Anyway, mysqld.log entries had more info now: So tried to set a much lower connect_work_size value: 64MB (default), So conclusion it would seem, is, CONNECT engine stopped being able to allocate based on connect_work_size after some time as mysqld & OS used more & more memory over time. Then tried setting connect_work_size to 1GB & tried a select again, still works. Increased another 1GB & select again, repeating a few more times. Started to notice from mysqld.log that memory set for connect_work_size stops being followed after some time, & last successful value is used. (this seems to be as per documentation). Since I had not come across a more detailed guide on how much to set connect_work_size to, made a stored procedure that I will call to set connect_work_size just before using CONNECT engine, try the size I want, then try CONNECT engine, if fail, try smaller size and try CONNECT engine, if fail, repeat until things work. Would be great if: Didn't log this is a bug but a request earlier because was trying to ask how to troubleshoot it & hadn't prove it is a bug yet. |