Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlPredicate Operation Timeout #263

Closed
huihui opened this issue Sep 5, 2012 · 6 comments

Comments

Projects
None yet
2 participants
@huihui
Copy link

commented Sep 5, 2012

hello, all !

function :

public static Country getCountryByName(String cName) {
    Country co = new Country();
    String sqlKey = "coName = '" + cName + "'";
    Collection<Country> coll = (Collection<Country>) mapCountries
            .values(new SqlPredicate(sqlKey));

    Iterator<Country> it = coll.iterator();
    if (it.hasNext())
        co = it.next();
    return co;
}

Our application runs correctly when we do test manually.

However, Operation exceptions occur randomly while we begin stress testing, which sends request randomly. All of the exceptions have an common feature , they are cause by SqlPredicate Query .

It's a simple example, other queries using SqlPredicate have the same problem.

Corresponding Exception as below:

Sep 5, 2012 8:42:53 AM com.hazelcast.client.ProxyHelper
INFO: There is no response for Call [13652] operation=CONCURRENT_MAP_ITERATE_ENTRIES in 5 seconds.
java.lang.RuntimeException: [EXECUTE] Operation Timeout: -1
at com.hazelcast.impl.ClientServiceException.readData(ClientServiceException.java:63)
at com.hazelcast.nio.Serializer$DataSerializer.read(Serializer.java:104)
at com.hazelcast.nio.Serializer$DataSerializer.read(Serializer.java:79)
at com.hazelcast.nio.AbstractSerializer.toObject(AbstractSerializer.java:119)
at com.hazelcast.nio.AbstractSerializer.toObject(AbstractSerializer.java:148)
at com.hazelcast.client.ClientThreadContext.toObject(ClientThreadContext.java:72)
at com.hazelcast.client.IOUtil.toObject(IOUtil.java:34)
at com.hazelcast.client.ProxyHelper.getValue(ProxyHelper.java:186)
at com.hazelcast.client.ProxyHelper.doOp(ProxyHelper.java:146)
at com.hazelcast.client.ProxyHelper.doOp(ProxyHelper.java:140)
at com.hazelcast.client.ProxyHelper.entries(ProxyHelper.java:211)
at com.hazelcast.client.MapClientProxy.entrySet(MapClientProxy.java:92)
at com.hazelcast.client.MapClientProxy.values(MapClientProxy.java:174)
////////////////////////////////////////////////////////////////////////////////////////////////////////
at org.bench4Q.servlet.DBHelper.getCustomerByName(DBHelper.java:216)
////////////////////////////////////////////////////////////////////////////////////////////////////////
at org.bench4Q.servlet.Database.getCustomer(Database.java:106)
at org.bench4Q.servlet.buy_request_servlet.doGet(buy_request_servlet.java:113)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:679)

@huihui

This comment has been minimized.

Copy link
Author

commented Sep 5, 2012

sorry, each of them has the same problem, but corresponding function of the exception mentioned above is as below :

// SQL Customer
public static Customer getCustomerByName(String cName) {
    Customer cu = new Customer();
    String sqlKey = "CUname = '" + cName + "'";
    Collection<Customer> coll = (Collection<Customer>) mapCustomers
            .values(new SqlPredicate(sqlKey));

    Iterator<Customer> it = coll.iterator();
    if (it.hasNext())
        cu = it.next();
    return cu;
}
@mdogan

This comment has been minimized.

Copy link
Member

commented Sep 5, 2012

What is your Hazelcast version? And also can you post server side
(Hazelcast node side) stack trace of exception?

@huihui

This comment has been minimized.

Copy link
Author

commented Sep 6, 2012

We are using Hazelcast2.2. And the stack trace of exception from the server side is as below:

WARNING: [133.133.133.103]:5701 [HAZELCAST_GROUPS_1] exception during handling CONCURRENT_MAP_ITERATE_ENTRIES: [EXECUTE] Operation Timeout: -1
com.hazelcast.core.OperationTimeoutException: [EXECUTE] Operation Timeout: -1
at com.hazelcast.impl.BaseManager$ResponseQueueCall.waitAndGetResult(BaseManager.java:601)
at com.hazelcast.impl.BaseManager$ResponseQueueCall.getRedoAwareResult(BaseManager.java:623)
at com.hazelcast.impl.BaseManager$ResponseQueueCall.getResult(BaseManager.java:618)
at com.hazelcast.impl.ExecutorManager$MemberCall.doGetResult(ExecutorManager.java:617)
at com.hazelcast.impl.ExecutorManager$MemberCall.get(ExecutorManager.java:594)
at com.hazelcast.impl.ExecutorManager$MemberCall.get(ExecutorManager.java:587)
at com.hazelcast.core.DistributedTask$Inner.get(DistributedTask.java:227)
at com.hazelcast.core.DistributedTask.get(DistributedTask.java:118)
at com.hazelcast.impl.ConcurrentMapManager.tryQuery(ConcurrentMapManager.java:950)
at com.hazelcast.impl.ConcurrentMapManager.query(ConcurrentMapManager.java:910)
at com.hazelcast.impl.MProxyImpl$MProxyReal.query(MProxyImpl.java:1019)
at com.hazelcast.impl.MProxyImpl$MProxyReal.entrySet(MProxyImpl.java:986)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.hazelcast.impl.MProxyImpl$DynamicInvoker.invoke(MProxyImpl.java:66)
at $Proxy0.entrySet(Unknown Source)
at com.hazelcast.impl.MProxyImpl.entrySet(MProxyImpl.java:361)
at com.hazelcast.impl.ClientHandlerService$MapIterateEntriesHandler.getMapKeys(ClientHandlerService.java:1359)
at com.hazelcast.impl.ClientHandlerService$MapIterateEntriesHandler.doMapOp(ClientHandlerService.java:1378)
at com.hazelcast.impl.ClientHandlerService$ClientCollectionOperationHandler.processCall(ClientHandlerService.java:1672)
at com.hazelcast.impl.ClientHandlerService$ClientOperationHandler.handle(ClientHandlerService.java:1586)
at com.hazelcast.impl.ClientRequestHandler$1.run(ClientRequestHandler.java:57)
at com.hazelcast.impl.ClientRequestHandler$1.run(ClientRequestHandler.java:54)
at com.hazelcast.impl.ClientRequestHandler.doRun(ClientRequestHandler.java:63)
at com.hazelcast.impl.FallThroughRunnable.run(FallThroughRunnable.java:22)
at com.hazelcast.impl.ClientHandlerService$Worker.run(ClientHandlerService.java:230)
at java.lang.Thread.run(Unknown Source)

In addition, as the input scales sized up, We could get the same problem in manul testing.

The phenomenon below was observed several times:

After populating dataset, the size of the memory of javaw.exe was about 1,150M

Then we started the "client side" application. The size of the memory of javaw.exe on "server side" climbed to 1,500 and then outcome the exception.

The JVM is set as : " -Xms256m -Xmx1408m ".

@mdogan

This comment has been minimized.

Copy link
Member

commented Sep 6, 2012

I see, this is a issue related to no response operation timeout. It should
not appear on version 2.3. Can you please try version 2.3?

@mmdogan

On Thu, Sep 6, 2012 at 2:05 PM, huihui notifications@github.com wrote:

We are using Hazelcast2.2. And the stack trace of exception from the
server side is as below:

WARNING: [133.133.133.103]:5701 [HAZELCAST_GROUPS_1] exception during
handling CONCURRENT_MAP_ITERATE_ENTRIES: [EXECUTE] Operation Timeout: -1
com.hazelcast.core.OperationTimeoutException: [EXECUTE] Operation Timeout:
-1
at
com.hazelcast.impl.BaseManager$ResponseQueueCall.waitAndGetResult(BaseManager.java:601)
at
com.hazelcast.impl.BaseManager$ResponseQueueCall.getRedoAwareResult(BaseManager.java:623)
at
com.hazelcast.impl.BaseManager$ResponseQueueCall.getResult(BaseManager.java:618)
at
com.hazelcast.impl.ExecutorManager$MemberCall.doGetResult(ExecutorManager.java:617)
at
com.hazelcast.impl.ExecutorManager$MemberCall.get(ExecutorManager.java:594)
at
com.hazelcast.impl.ExecutorManager$MemberCall.get(ExecutorManager.java:587)
at com.hazelcast.core.DistributedTask$Inner.get(DistributedTask.java:227)
at com.hazelcast.core.DistributedTask.get(DistributedTask.java:118)
at
com.hazelcast.impl.ConcurrentMapManager.tryQuery(ConcurrentMapManager.java:950)
at
com.hazelcast.impl.ConcurrentMapManager.query(ConcurrentMapManager.java:910)
at com.hazelcast.impl.MProxyImpl$MProxyReal.query(MProxyImpl.java:1019)
at com.hazelcast.impl.MProxyImpl$MProxyReal.entrySet(MProxyImpl.java:986)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.hazelcast.impl.MProxyImpl$DynamicInvoker.invoke(MProxyImpl.java:66)
at $Proxy0.entrySet(Unknown Source)
at com.hazelcast.impl.MProxyImpl.entrySet(MProxyImpl.java:361)
at
com.hazelcast.impl.ClientHandlerService$MapIterateEntriesHandler.getMapKeys(ClientHandlerService.java:1359)
at
com.hazelcast.impl.ClientHandlerService$MapIterateEntriesHandler.doMapOp(ClientHandlerService.java:1378)
at
com.hazelcast.impl.ClientHandlerService$ClientCollectionOperationHandler.processCall(ClientHandlerService.java:1672)
at
com.hazelcast.impl.ClientHandlerService$ClientOperationHandler.handle(ClientHandlerService.java:1586)
at
com.hazelcast.impl.ClientRequestHandler$1.run(ClientRequestHandler.java:57)
at
com.hazelcast.impl.ClientRequestHandler$1.run(ClientRequestHandler.java:54)
at
com.hazelcast.impl.ClientRequestHandler.doRun(ClientRequestHandler.java:63)
at com.hazelcast.impl.FallThroughRunnable.run(FallThroughRunnable.java:22)
at
com.hazelcast.impl.ClientHandlerService$Worker.run(ClientHandlerService.java:230)
at java.lang.Thread.run(Unknown Source)

In addition, as the input scales sized up, We could get the same problem
in manul testing.

The phenomenon below was observed several times:

After populating dataset, the size of the memory of javaw.exe was about
1,150M

Then we started the "client side" application. The size of the memory of
javaw.exe on "server side" climbed to 1,500 and then outcome the exception.

The JVM is set as : " -Xms256m -Xmx1408m ".


Reply to this email directly or view it on GitHubhttps://github.com//issues/263#issuecomment-8329002.

@huihui

This comment has been minimized.

Copy link
Author

commented Sep 7, 2012

After 15s it got a response. However it works!! Thank you !!

@mdogan

This comment has been minimized.

Copy link
Member

commented Sep 7, 2012

Non-responsiveness may be caused by GC cycles. If it reaches to 1500 mb (with max configured to -Xmx1408m) then there will be lots of GC runs.

@mdogan mdogan closed this Sep 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.