Closed tadeubonatti closed 7 years ago
There should not be a timeout, but it can happen that the Word process is killed by Windows? There is a wrapper implementation for a converter that automatically restarts the server when it becomes inactive, maybe you can try to use this?
This implementation looks like what I want, but, I haven't found it. Can I restart the server by the client? How?
Have a look at this wrapper: https://github.com/documents4j/documents4j/blob/master/documents4j-aggregation/src/main/java/com/documents4j/job/FailureAwareConverter.java
Using it, you can shut down a converter on a failure. Also have a look at the other classes to add redundancy to your cluster to better overcome failures.
I've looked your suggestion, but, I think isn't my solution. I'm gonna explain my problem again, with more details:
I start a Conversion Server in this way:
java -jar documents4j-server-standalone-shaded.jar http://localhost:9998
My client makes a RemoteConverter and use it normally few times. In a moment, the Conversion Server goes down (operational "false")... If I access it in a browser, it shows:
<remote-converter>
<operational>false</operational>
<protocolVersion>1</protocolVersion>
<supportedConversions>...</supportedConversions>
<timeout>120000</timeout>
</remote-converter>
After then, I can create various remote converters in the client, all of them can't make the conversion, because the server isn't operational. So, in this moment I need to restart the Conversion Server.
The Conversion Server is my problem, not the Remote Converter, do you understand? What Am I doing wrong?
In this case, you need to have some server redundancy and a broker who restarts the service upon failure. On the client side, you can then add the failover.
Ok! Will be develop.
Thanks for the replies.
Hello,
Is there a timeout for the documents-4j-server-standalone due to inactivity? I've used the server normally for a few times, but after a few hours without use it, the server goes down (operational "false"), and I don't know why. The server throws FileSystemInteractionException, but it doens't make any sense for me, the system did the same request, with same file, more than once few hours ago. After then, I restart server and it works.
I've read the documentation but I haven't found any information about this. Can you help me?
How I get the remote converter (I only create one instance in the context with a Factory):
RemoteConverter.builder().workerPool(20, 25, 20, TimeUnit.SECONDS).requestTimeout(20, TimeUnit.SECONDS).baseUri(baseUri).build();
How I convert: