Re: CommunicationsException when using cursor-based fetch of large dataset
Posted by: Filipe Silva
Date: June 04, 2018 12:35PM

Hi,

Setting `autoReconnect=true` wouldn't help at all with regard to timeouts occurring while fetching data. You still get the communication exception, the connection is re-established but the previous cursor/prepared statement is lost.

From here it seems that your queries are taking more that 15 mins to start returning results. I don't know what is the reason for that but I would check the server's error log to try to identify the issue. You can also turn the slow query log on [https://dev.mysql.com/doc/refman/8.0/en/slow-query-log.html] to help you identify problematic queries.

Having spotted the possible culprits you can try to analyze their execution plans to see if there's something you should change in your table structures to improve the results [https://dev.mysql.com/doc/refman/8.0/en/execution-plan-information.html].

You can also get additional details from the performance schema that may help you identifying what's wrong [https://dev.mysql.com/doc/refman/8.0/en/performance-schema.html].

IHTH

Options: ReplyQuote


Subject
Written By
Posted
Re: CommunicationsException when using cursor-based fetch of large dataset
June 04, 2018 12:35PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.