0

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 for postgresql itself. But I guess there might be some settings\parameters in hibernate which can affect it. Any suggestion for the search direction?

4
  • 1
    If you have a failure, you must have an exception. I'd start looking at its message (if I could see it). Commented Jul 1, 2011 at 12:37
  • logs looks clean, so it looks like issue on hibernate side Commented Jul 1, 2011 at 13:07
  • 1
    What do you mean by "it fails". Do you have an error? Is the text truncated? Is the row inserted without this column? Is the insert silently ignored? Do you see the insert SQL query generated by Hibernate? Where is the code doing the insert? Is it so secret that you can't show it to us? You make it very hard for us to help you by not giving any detail. Commented Jul 1, 2011 at 13:11
  • I'm not familiar with the product. Don't have direct access to instance which has this problem. Haven't got any exceptions in avaliable logs. Database persistance logic is spread accross many classes so I don't undestand it myself yet. Giving all these facts I had asked only for suggestion for search directions ))) I don't excpect somebody can give me solution based on this description ))) All what I have now it's symptom like big record is not inserted into DB. Commented Jul 1, 2011 at 14:04

1 Answer 1

1
  • 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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.