开发者

Multithreading app timeout exceptions --> OpenERP Integration

开发者 https://www.devze.com 2023-03-28 05:51 出处:网络
I am writing an .net application that interface with OpenERP via its xml-rpc service. I am using the cook computing library for this.

I am writing an .net application that interface with OpenERP via its xml-rpc service. I am using the cook computing library for this.

the purpose of this application is to load (or update) a huge number of products into OpenERP > 100000, doing it synchronously takes time, and so I wrapped the call into a Parallel.ForEach call,

the problem is that I keep getting a timeout exception for some threads, and I couldn't figure out where the problem is, is it some sort of configuration that needs to be adjusted ??, --> need help.

here is my configuration:

  • the xml-rpc library timeout is set to : 16 min
  • ParallelOptions --> MaxDegreeOfParallelism is set to 6
  • and the max number of connections is set to 36

Connection configuration:

<system.net>
    <connectionManagement>
        <add address="*" maxconnection="36" />
    </connectionManagement>
</system.net>

at the time of writing, I am testing with 9 products, with the aforementioned settings, 4 threads timeout, including开发者_开发知识库 main

Thanks everyone, waiting for your responses.

Abdelkrim.


If you're going to be hammering your OpenERP server with 6 threads doing data load, there's a pretty good chance you're going to get conflicts at the database transaction level. I'm not sure why it would completely time out, I would have expected delays or deadlock exceptions.

If you just want to maximize your throughput for data load, try timing it with a single thread loading 100 products, then two threads, three threads and so on. I'm guessing that three threads won't be any faster than two threads, because most of the delay will be in the database, and not in any client processing. The only gain with two threads would be that you don't have to wait for the network communication.

Of course this is all speculation on my part. Measure it and post your results.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号