Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

JForex-SDK Sample with Eclipse overload the CPU
 Post subject: JForex-SDK Sample with Eclipse overload the CPU Post rating: 0   New post Posted: Mon 08 Jun, 2015, 19:43 

User rating: 0
Joined: Fri 22 May, 2015, 10:10
Posts: 10
Location: France,
Hello Everybody,
Image
Image

I work with the latest JForex-SDK in Eclipse. I can connect easily ( the last week i had to download the latest JForex-SDK to continue to connect ).
I just use the sample in JForex-SDK with a tiny java class which connect with JNI my previous code in C++. The C++ code just write in a file ask and bid tick.

The use of the cpu should be very very light. It is the way at the beginning.
And after several minutes, the JForex-SDK application ( with my JNI c++ called ) in Eclipse overload the 2 cpu of my computer.
I joined 2 screen copy with :
- the task manager,
- the console of eclipse with a lot of message
Strategy thread queue overloaded with tasks. Ticks in queue - 3, bars - 41510, other tasks - 11367
Strategy thread queue overloaded with tasks. Ticks in queue - 3, bars - 41811, other tasks - 11444
Strategy thread queue overloaded with tasks. Ticks in queue - 3, bars - 41524, other tasks - 11367
Strategy thread queue overloaded with tasks. Ticks in queue - 3, bars - 41811, other tasks - 11444
.......
12 hours later, the application is still running with a big memory. And the cpu is still overloaded....
Sometimes, the application stopped before.

Are there any options i forgot ? or other solutions ? any light in the night ?

Best Regards,

Jeannot


Attachments:
CPU Overload 12 hours later...JPG [396.1 KiB]
Downloaded 394 times
CPU Overload at beginning....JPG [390.82 KiB]
Downloaded 355 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: JForex-SDK Sample with Eclipse overload the CPU Post rating: 0   New post Posted: Wed 10 Jun, 2015, 07:08 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please give code example that would reproduce the problem.


 
 Post subject: Re: JForex-SDK Sample with Eclipse overload the CPU Post rating: 0   New post Posted: Tue 16 Jun, 2015, 12:48 

User rating: 0
Joined: Fri 22 May, 2015, 10:10
Posts: 10
Location: France,
Hello,
than'k's for your help.
i want to isolate the trouble so i write a new Strategy which :
- is the only one,
- receives all the datafeed for the chosen currencies,
- writes in different files.
It works fine. I joined the MA_Play2.java.

My C++ was called with JNI by my tiny application JForex. I use MinGW under WinXP because Cygwin is incompatible with JNI because posix layer.....
I scan the run of my dll with Dr Memory. It detects "Probable Errors" in ACE and Xerces librairies ( i need these libraries for socket ( ACE ) and XML ( Xerces ) ), not in my code.
Perhaps the management of the heap by the JVM was more sensitive and so the application crashes.
I stopped the JNI solution.

I'm writing a socket server plugged in my JForex Application to communicate with a C++ standalone application.

Bye

Jeannot

PS : when i launch my new tiny application, sometimes there are small error but the apllication is still running.
main : Connecting...
2015-06-15 22:02:03.170 INFO AuthorizationClient - Selecting the best server...
2015-06-15 22:02:03.811 INFO AuthorizationClient - retry count = 1, properties request time = 2015-06-15 22:02:03
2015-06-15 22:02:04.545 INFO AuthorizationClient - retry count = 1, properties response time = 2015-06-15 22:02:04
2015-06-15 22:02:04.717 INFO ClientProtocolHandler - TcpNoDelay=false
2015-06-15 22:02:05.623 INFO ClientConnector - Primary connect successfull, primarySession is [MinaIoSessionWrapper [session=(SOCKET, R: d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443, L: /192.168.0.11:1401, S: d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443)]], address is [d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443]
2015-06-15 22:02:05.998 WARN WLabelData - White Label Image is not received
2015-06-15 22:02:06.514 INFO GreedClientAuthorizationProvider - !!!:Thread[ClientConnector,5,main]
main : Connected
main : Subscribing instruments...
main : Subscribing instruments...OK
2015-06-15 22:02:07.717 INFO ClientConnector - Child session opened for [d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443]
Strategy "MA_Play2" Strategy ID: 8CC305E7007ADB89ADA1FC621DC1E4EC is started at 2015-06-15 20:02:09.312 GMT on the local computer with no parameters
Started
main : Strategy started : 60
2015-06-15 22:54:20.241 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=86400000,changedFrom=1434326400000,changedTo=1434398400000,timestamp=1434401660201)>
2015-06-15 22:54:20.303 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=3600000,changedFrom=1434394800000,changedTo=1434398400000,timestamp=1434401660283)>
2015-06-15 22:54:20.381 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=60000,changedFrom=1434394800000,changedTo=1434398400000,timestamp=1434401660362)>
2015-06-15 23:36:13.060 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=JPN.IDX/JPY,period=86400000,changedFrom=1434326400000,changedTo=1434402000000,timestamp=1434404173062)>
2015-06-15 23:36:13.122 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=JPN.IDX/JPY,period=3600000,changedFrom=1434398400000,changedTo=1434402000000,timestamp=1434404173124)>
2015-06-15 23:36:13.200 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=JPN.IDX/JPY,period=60000,changedFrom=1434398400000,changedTo=1434402000000,timestamp=1434404173207)>
2015-06-16 00:00:00.050 INFO MissingFileEntryManager - Starting to analyze all cache for mffolder.
2015-06-16 00:00:01.378 INFO MissingFileEntryManager - Finished all cache analization for mffolder! Duration [1328] ms
2015-06-16 00:35:28.874 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=86400000,changedFrom=1434326400000,changedTo=1434405600000,timestamp=1434407728873)>
2015-06-16 00:35:28.920 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=3600000,changedFrom=1434402000000,changedTo=1434405600000,timestamp=1434407728930)>
2015-06-16 00:35:28.983 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=60000,changedFrom=1434402000000,changedTo=1434405600000,timestamp=1434407728989)>
2015-06-16 01:33:16.327 ERROR TimeManager - Request to DFS timed out, timeout [10000], request [<ServerTimeRequestMessage(,requestId=338)>]
com.dukascopy.charts.data.datacache.DataCacheException: Request to DFS timed out, timeout [10000], request [<ServerTimeRequestMessage(,requestId=338)>]
at com.dukascopy.charts.data.datacache.CurvesJsonProtocolHandler.processMessage(CurvesJsonProtocolHandler.java:1229)
at com.dukascopy.charts.data.datacache.CurvesJsonProtocolHandler.processMessage(CurvesJsonProtocolHandler.java:1149)
at com.dukascopy.charts.data.datacache.CurvesJsonProtocolHandler.loadServerTime(CurvesJsonProtocolHandler.java:1249)
at com.dukascopy.charts.data.datacache.time.TimeManager$4.run(TimeManager.java:236)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2015-06-16 01:33:20.484 ERROR TransportClient - Client disconnected, child connection ping failed
java.util.concurrent.TimeoutException: No response from server. Request: <HeartbeatRequestMessage(,synchRequestId=2448)>
at com.dukascopy.dds4.transport.client.TransportClient.controlSynchRequest(TransportClient.java:959)
at com.dukascopy.dds4.transport.client.TransportClient.pingIoSession(TransportClient.java:722)
at com.dukascopy.dds4.transport.client.TransportClient.pingChildSession(TransportClient.java:787)
at com.dukascopy.dds4.transport.client.TransportClient.pingConnection(TransportClient.java:778)
at com.dukascopy.dds4.transport.client.TransportClient.access$200(TransportClient.java:57)
at com.dukascopy.dds4.transport.client.TransportClient$1.run(TransportClient.java:421)
at java.lang.Thread.run(Unknown Source)
2015-06-16 01:33:42.468 INFO ClientConnector - Failed to open child session for [d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443], attempt [1]
2015-06-16 01:33:44.468 ERROR ClientConnector - Exception caught
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:218)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:198)
at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProcessor.java:45)
at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:485)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
at java.lang.Thread.run(Unknown Source)
2015-06-16 01:34:04.609 INFO ClientConnector - Failed to open child session for [d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443], attempt [2]
2015-06-16 01:34:04.702 INFO ClientProtocolHandler - Disconnect task in queue, reason [EXCEPTION_CAUGHT], server address [d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443], transport name [null]
main : Disconnected
2015-06-16 01:34:05.812 INFO ClientConnector - Primary connect successfull, primarySession is [MinaIoSessionWrapper [session=(SOCKET, R: d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443, L: /192.168.0.11:1619, S: d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443)]], address is [d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443]
2015-06-16 01:34:06.702 INFO GreedClientAuthorizationProvider - !!!:Thread[ClientConnector,5,main]
main : Connected
2015-06-16 01:34:07.812 INFO ClientConnector - Child session opened for [d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443]
2015-06-16 01:35:15.624 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=EUR/HKD,period=86400000,changedFrom=1434326400000,changedTo=1434409200000,timestamp=1434411315611)>
2015-06-16 01:35:15.671 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=EUR/HKD,period=3600000,changedFrom=1434405600000,changedTo=1434409200000,timestamp=1434411315660)>
2015-06-16 01:35:15.749 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=EUR/HKD,period=60000,changedFrom=1434405600000,changedTo=1434409200000,timestamp=1434411315738)>
2015-06-16 02:18:09.014 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=86400000,changedFrom=1434326400000,changedTo=1434412800000,timestamp=1434413889012)>
2015-06-16 02:18:09.061 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=3600000,changedFrom=1434409200000,changedTo=1434412800000,timestamp=1434413889058)>
2015-06-16 02:18:09.123 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=60000,changedFrom=1434409200000,changedTo=1434412800000,timestamp=1434413889114)>
2015-06-16 03:23:47.967 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=86400000,changedFrom=1434412800000,changedTo=1434416400000,timestamp=1434417827959)>
2015-06-16 03:23:48.014 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=3600000,changedFrom=1434412800000,changedTo=1434416400000,timestamp=1434417828005)>
2015-06-16 03:23:48.061 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=60000,changedFrom=1434412800000,changedTo=1434416400000,timestamp=1434417828054)>
2015-06-16 04:29:20.705 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=86400000,changedFrom=1434412800000,changedTo=1434420000000,timestamp=1434421760699)>
2015-06-16 04:29:20.736 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=3600000,changedFrom=1434416400000,changedTo=1434420000000,timestamp=1434421760741)>
2015-06-16 04:29:20.783 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=60000,changedFrom=1434416400000,changedTo=1434420000000,timestamp=1434421760788)>
2015-06-16 05:39:14.755 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=86400000,changedFrom=1434412800000,changedTo=1434423600000,timestamp=1434425954766)>
2015-06-16 05:39:14.802 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=3600000,changedFrom=1434420000000,changedTo=1434423600000,timestamp=1434425954813)>
2015-06-16 05:39:14.848 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=60000,changedFrom=1434420000000,changedTo=1434423600000,timestamp=1434425954864)>
2015-06-16 06:48:21.733 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=86400000,changedFrom=1434412800000,changedTo=1434427200000,timestamp=1434430101730)>
2015-06-16 06:48:21.796 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=3600000,changedFrom=1434423600000,changedTo=1434427200000,timestamp=1434430101784)>
2015-06-16 06:48:21.843 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=60000,changedFrom=1434423600000,changedTo=1434427200000,timestamp=1434430101840)>
2015-06-16 07:47:52.239 ERROR TransportClient - Client disconnected, primary connection ping failed
java.util.concurrent.TimeoutException: No response from server. Request: <HeartbeatRequestMessage(,synchRequestId=6794)>
at com.dukascopy.dds4.transport.client.TransportClient.controlSynchRequest(TransportClient.java:959)
at com.dukascopy.dds4.transport.client.TransportClient.pingIoSession(TransportClient.java:722)
at com.dukascopy.dds4.transport.client.TransportClient.pingPrimarySession(TransportClient.java:802)
at com.dukascopy.dds4.transport.client.TransportClient.pingConnection(TransportClient.java:777)
at com.dukascopy.dds4.transport.client.TransportClient.access$200(TransportClient.java:57)
at com.dukascopy.dds4.transport.client.TransportClient$1.run(TransportClient.java:421)
at java.lang.Thread.run(Unknown Source)
2015-06-16 07:47:52.255 INFO ClientProtocolHandler - Disconnect task in queue, reason [CONNECTION_PROBLEM], server address [d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443], transport name [null]
main : Disconnected
2015-06-16 07:48:02.239 ERROR TransportClient - Client disconnected, child connection ping failed
java.util.concurrent.TimeoutException: No response from server. Request: <HeartbeatRequestMessage(,synchRequestId=6795)>
at com.dukascopy.dds4.transport.client.TransportClient.controlSynchRequest(TransportClient.java:959)
at com.dukascopy.dds4.transport.client.TransportClient.pingIoSession(TransportClient.java:722)
at com.dukascopy.dds4.transport.client.TransportClient.pingChildSession(TransportClient.java:787)
at com.dukascopy.dds4.transport.client.TransportClient.pingConnection(TransportClient.java:778)
at com.dukascopy.dds4.transport.client.TransportClient.access$200(TransportClient.java:57)
at com.dukascopy.dds4.transport.client.TransportClient$1.run(TransportClient.java:421)
at java.lang.Thread.run(Unknown Source)
2015-06-16 07:48:14.208 INFO ClientConnector - Primary connect call failed, address [d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443]
2015-06-16 07:48:14.301 INFO ClientProtocolHandler - Disconnect task in queue, reason [CONNECTION_PROBLEM], server address [d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443], transport name [null]
main : Disconnected
2015-06-16 07:48:15.411 INFO ClientConnector - Primary connect successfull, primarySession is [MinaIoSessionWrapper [session=(SOCKET, R: d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443, L: /192.168.0.11:1984, S: d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443)]], address is [d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443]
2015-06-16 07:48:16.333 INFO GreedClientAuthorizationProvider - !!!:Thread[ClientConnector,5,main]
main : Connected
2015-06-16 07:48:17.520 INFO ClientConnector - Child session opened for [d-ja-gva-141-194.dukascopy.com/194.8.15.194:10443]
2015-06-16 07:48:41.567 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=86400000,changedFrom=1434412800000,changedTo=1434430800000,timestamp=1434433721535)>
2015-06-16 07:48:41.630 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=3600000,changedFrom=1434427200000,changedTo=1434430800000,timestamp=1434433721608)>
2015-06-16 07:48:41.692 WARN CurvesJsonProtocolHandler - DFHistoryChangedMessage received from history server, but none is waiting for it: <DFHistoryChangedMessage(instrument=GBP/JPY,period=60000,changedFrom=1434427200000,changedTo=1434430800000,timestamp=1434433721669)>


Attachments:
MA_Play2.java [9.31 KiB]
Downloaded 121 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com