Hi Samira,
I don't know exactly what your problem is but I experienced same / similar issues when using DI API in a web environment.
It seems to be some kind of memory leak / marshalling / managed->unmanaged / threading problem ( and it seemed to start with 9.0). There are also some threads in this forum about this issue.
I know it is not helping you exactly but have a look into DI Server / maybe B1i .
Another idea would be to work only with one instance of the company object or to use an windows service to do the work -> using only one DI API connection / queuing the calls.
regards,
Maik