Gustavo,
In a case like that you would have to kick off an asynchronous process, instead of calling your procedure. For instance use an MQ transaction, on the mainframe we would have a process start a batch job, so that the task is done separately or to kick off a CICS transaction, which would do the piece of work.