Timeout when using event driven proxy from a remote machine
Hi,
we are getting an error when trying to call proxy's methods from a remote machine. If we run the client in the same machine as we have Gigaspaces deployed, then everything works fine, but when we run the client in a different machine, then we see that the request reaches the server, it is processed by the server, but the response takes a lot or it doesn't return at all giving as a timeout.
We don't have the service code and the space collocated, and that's why we are using the event driven proxy instead of the executor proxy. Here is the space definition in our space's PU:
<os-core:space id="orderSpace" url="/./${orderSpace.name}" schema="persistent" mirror="true" external-data-source="hibernateDataSource"> <os-core:properties> <props> <prop key="space-config.engine.cache_policy">1</prop> <prop key="space-config.external-data-source.usage">read-only</prop> <prop key="cluster-config.cache-loader.external-data-source">true</prop> <prop key="cluster-config.cache-loader.central-data-source">true</prop> <prop key="cluster-config.mirror-service.url">jini:////${orderMirror.name}</prop> </props> </os-core:properties> </os-core:space>
Then, in the service's PU configuration, we access the space and export the services with the following configuration:
<os-core:distributed-tx-manager id="transactionManager"/> <os-core:space id="orderSpace" url="jini://*/*/${orderSpace.name}"/> <os-core:giga-space id="orderGigaSpace" space="orderSpace" tx-manager="transactionManager"/>
<os-remoting:service-exporter id="serviceExporter">
<os-remoting:service ref="profileService"/>
<os-remoting:service ref="authenticationService"/>
<os-remoting:service ref="serviceOrderService"/>
<os-remoting:service ref="productOrderService"/>
<os-remoting:service ref="serviceInstanceService"/>
<os-remoting:service ref="serviceSpecificationService"/>
<os-remoting:service ref="workOrderService"/>
<os-remoting:service ref="usageService"/>
<os-remoting:service ref="orderTraceService"/>
<os-remoting:service ref="distributorService"/>
</os-remoting:service-exporter>
<os-events:polling-container id="apiEventContainer" giga-space="orderGigaSpace" receive-timeout="${receiveTimeout}" concurrent-consumers="${concurrentConsumers}" max-concurrent-consumers="${maxConcurrentConsumers}"> <os-events:receive-operation-handler> <bean class="org.openspaces.events.polling.receive.SingleTakeReceiveOperationHandler"> <property name="nonBlocking" value="true"/> <property name="nonBlockingFactor" value="${nonBlockingFactor}"/> </bean> </os-events:receive-operation-handler>
<os-events:listener ref="serviceExporter" />
</os-events:polling-container>
Finally, in the client code that is executed from a remote machine, we have the following:
<os-core:space id="orderSpace" url="jini://*/*/orderSpace?locators=192.168.5.119:4164"/>
Where 192.168.5.119 is the machine where Gigaspaces is running. We have configured the LOOKUPLOCATORS and NIC_ADDR variables in the server.
We tried using a collocated space with the services and we got the same problem using the event driven proxy, but it worked when using the executor proxy.
We have tried a lot of things but nothing seems to work. Is there something we are doing wrong? We don't see any error in the server, and the exception we get in the client is a RemoteTimeoutException.
Thanks,
Diego
{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=3651]{quote}