|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
Thread queue overflow |
[fmplns]
|
Post subject: Thread queue overflow |
Post rating: 0
|
Posted: Fri 18 Dec, 2009, 09:28
|
|
User rating: 0
Joined: Thu 17 Dec, 2009, 16:39 Posts: 5
|
One example of this kind of messages is "05:54:27 Thread queue overflow. Ticks in queue - 34, bars - 465, other tasks - 1 05:54:27 com.dukascopy.api.impl.execution.a@1dfacac".
2 questions: 1. The message "Thread queue overflow" is showed at times when the strategy is running. What causes this to happen? 2. How to avoid this? Thanks in advance.
|
|
|
|
 |
API Support
|
Post subject: Re: Thread queue overflow |
Post rating: 0
|
Posted: Fri 18 Dec, 2009, 11:00
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Hello! Strategy engine has a queue of tasks, like TickTask, BarTask or OrderChangedTask. This tasks call corresponding methods of your strategy - onTick, onBar, onMessage. Thread queue overflow error means that there is too much waiting tasks in queue. As you can see there is 465 bar tasks. Even if you are subscribed to all instruments and today is a start of month (most candles are generated) it's still only 22 * 11 = 242 bars. You have 465, this means something blocks strategy thread and it cannot process all bars in time. Please check your logic and look for the places where strategy thread is used to do some time consuming tasks. Move this logic to separate threads or optimize it's logic in some other way.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|