Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to cause a "ORA-01555: snapshot too old error" without updates

I am running into ORA-01555: snapshot too old errors with Oracle 9i but am not running any updates with this application at all.

The error occurs after the application has been connected for some hours without any queries, then every query (which would otherwise be subsecond queries) comes back with a ORA-01555: snapshot too old: rollback segment number 6 with name "_SYSSMU6$" too small.

Could this be cause of transaction isolation set to TRANSACTION_SERIALIZABLE? Or some other bug in the JDBC code? This could be caused by a bug in the jdbc-go driver but everything I've read about this bug has led me to believe scenarios where no DML statements are made this would not occur.

like image 632
buckaroo1177125 Avatar asked Nov 12 '15 04:11

buckaroo1177125


People also ask

How do you resolve ORA-01555 caused by SQL statement?

To resolve the issue, increase the size of your rollback segment (undo) size.


1 Answers

Read below a very good insight on this error by Tom Kyte. The problem in your case may come from what is called 'delayed block cleanout'. This is a case where selects creates redo. However, the root cause is almost sure improper size of rollback segments(but Tom adds as correlated causes: too frequently commits, a too big read after many updates, etc).

snaphot too old error (Tom Kyte)

like image 76
Florin stands with Ukraine Avatar answered Oct 19 '22 11:10

Florin stands with Ukraine