This is custom code - so you've written something wrong.
My guess is that you have a loop and you're committing inside the loop. Explicit commits inside a concurrent request are bad regardless, however see here (https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4951966319022 ) for an explanation of why they are especially bad inside loops.
If that is NOT the case then is your custom code querying from a table using flashback (Select * from Table as of Timestamp...)? If so then again, a bad idea.
Really two options...
1) Alter your database so it has enough retention to accomodate the run time and you wont get this error:
ORA-01555: snapshot too old
2) Improve performance of the query so that it finishes faster before you get the error.
1) The code is clearly flawed. Why stick a plaster over it rather than fixing it?
2) How on earth is that going to help!!?