开发者

big insert query fails Hibernate\Postgresql

I'm trying to find out the root cause of failure in existing system. I don't know much about it, but looks like the issue is in inserting big row into Postregsql via Hibernate. It fails to insert record w/ TEXT field which is about 50-100k size.

Should not be an issue fo开发者_StackOverflow社区r postgresql itself. But I guess there might be some settings\parameters in hibernate which can affect it. Any suggestion for the search direction?


  • First I try to look at the exception, if it's in your local machine or a server log, to get more clues. Since you say it's when inserting a row, maybe you know where it's happening.

  • Try inserting a row where the text field has only a few bytes to see if that works. Maybe the connection is slow and inserting more than 50k causes a timeout followed by a rollback.

  • Also check out if that insertion belongs to a much larger transaction or it's executing on a smaller one.

  • Try doing that insertion in plain jdbc (just temporarily) to see if that works and rule out connection issues.

  • If the problem is not in the connection then you can start tweaking Hibernate parameters. Maybe disabling the 2nd cache. The stack exception or a debugging session will be helpful to know what parameters to change.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜