You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Florent ANDRE (JIRA)" <ji...@apache.org> on 2011/06/03 16:17:47 UTC

[jira] [Created] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Plateform timeout when engine process more than 1 minute
--------------------------------------------------------

                 Key: STANBOL-217
                 URL: https://issues.apache.org/jira/browse/STANBOL-217
             Project: Stanbol
          Issue Type: Bug
          Components: Enhancer
            Reporter: Florent ANDRE


After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.

This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.

With the use of this curl call : 
time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines

Browser timeout can be an eliminate usual suspect as -m means :
 -m/--max-time <seconds>
              Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
              networks or links going down.  See also the --connect-timeout option.

In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.

1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.

[1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068166#comment-13068166 ] 

Bertrand Delacretaz commented on STANBOL-217:
---------------------------------------------

Instead of configuring timeouts, could the engines make sure something's written to the response at regular intervals, to avoid timing out?

[1] says " if a single byte is read or written, then the timeout (if implemented by jetty) is reset" so maybe just writing one space character to the output would do. I haven't tried it, and buffers might get in the way, and that would add extra spaces to the output, so just a suggestion for now.

[1] http://jetty.codehaus.org/jetty/jetty-6/apidocs/org/mortbay/jetty/nio/SelectChannelConnector.html#setMaxIdleTime(int)

> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> This is just on the browser side that the timeout occur, the engine continue to process.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Florent ANDRE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florent ANDRE updated STANBOL-217:
----------------------------------

    Description: 
After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.

This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
This is just on the browser side that the timeout occur, the engine continue to process.

With the use of this curl call : 
time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines

Browser timeout can be an eliminate usual suspect as -m means :
 -m/--max-time <seconds>
              Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
              networks or links going down.  See also the --connect-timeout option.

In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.

1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.

[1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

  was:
After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.

This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.

With the use of this curl call : 
time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines

Browser timeout can be an eliminate usual suspect as -m means :
 -m/--max-time <seconds>
              Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
              networks or links going down.  See also the --connect-timeout option.

In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.

1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.

[1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E


> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> This is just on the browser side that the timeout occur, the engine continue to process.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Florent ANDRE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067975#comment-13067975 ] 

Florent ANDRE edited comment on STANBOL-217 at 7/19/11 9:25 PM:
----------------------------------------------------------------

To have a configurable timeout while the Felix patch is not merge into trunk :

- checkout Felix trunk
- apply patch in FELIX-2687
- mvn build install the http/jetty module or all the Felix trunk
- update to 2.2.1-SNAPSHOT the org.apache.felix.http.jetty dependency in your launcher/pom.xml
- build your stanbol
- configure the http timeout property in the http bundle configuration

Enjoy !

      was (Author: flo4sengines):
    To have a configurable timeout while the Felix patch is not merge into trunk :

- checkout Felix trunk
- apply patch in FELIX-2687
- mvn build install the http/jetty module or all the Felix trunk
- update the org.apache.felix.http.jetty dependency in your launcher/pom.xml
- build your stanbol
- configure the http timeout property in the http bundle configuration

Enjoy !
  
> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> This is just on the browser side that the timeout occur, the engine continue to process.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Florent ANDRE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florent ANDRE updated STANBOL-217:
----------------------------------

    Attachment: global-timeout.patch

Here comes a patch for the just wait engine.


> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Olivier Grisel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043386#comment-13043386 ] 

Olivier Grisel edited comment on STANBOL-217 at 6/3/11 3:15 PM:
----------------------------------------------------------------

Stanbol itself does not implement any kind of timeout logic. The behavior you observe might come from the HTTPService implementation provided by Felix:

  https://svn.apache.org/repos/asf/felix/trunk/http.jetty/src/main/java/org/apache/felix/http/jetty/Activator.java

look for the line: connector.setMaxIdleTime( 60000 );

AFAIK there is know way to override this behavior using the public OSGi HTTPService configuration or API.

The solution is either use faster engines and restrict to engines that do not do synchronous lookup to remote network resources (e.g. prefil the EntiyHub with a precomputed SolrYard index of your knowledge base and use in offline mode) or do a POST request to the ContentHub API and do polling to fetch the results later. As noted earlier the current ContentHub implementation is a hack because of the use of the InMemoryStore for the content item streams.

      was (Author: ogrisel):
    Stanbol itself does not implement any kind of timeout logic. The behavior you observer might come from the HTTPService implementation provided by Felix:

  https://svn.apache.org/repos/asf/felix/trunk/http.jetty/src/main/java/org/apache/felix/http/jetty/Activator.java

look for the line: connector.setMaxIdleTime( 60000 );

AFAIK there is know way to override this behavior using the public OSGi HTTPService configuration or API.

The solution is either use faster engines and restrict to engines that do not do synchronous lookup to remote network resources (e.g. prefil the EntiyHub with a precomputed SolrYard index of your knowledge base and use in offline mode) or do a POST request to the ContentHub API and do polling to fetch the results later. As noted earlier the current ContentHub implementation is a hack because of the use of the InMemoryStore for the content item streams.
  
> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> This is just on the browser side that the timeout occur, the engine continue to process.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Florent ANDRE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043435#comment-13043435 ] 

Florent ANDRE commented on STANBOL-217:
---------------------------------------

Seems that you hit the good class ! 

On your point about override the value, I had a look at configuration manager / Apache Felix Jetty Based Http Service but don't see a configuration for that... And reading class show that the value is hard coded.
Don't see for now how to directly deal with the API.

This timeout error discovery don't have for origin the ContentHub, but the /engines endpoint.

The main problem with this timeout is that's a global value for all the processing chain and not for each engine... 

So even if each engine do his job in less than 1 minute, an aggregation of many engines working on a some particularly big documents (let's says a PHD thesis of 400 pages) can reach the "1 minute" limit.

I may be wrong, put this seems to me an important limit, and something that can create some unpredictable errors depending on the size / number of entities of the document (even if all is offline).

> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> This is just on the browser side that the timeout occur, the engine continue to process.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Olivier Grisel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068219#comment-13068219 ] 

Olivier Grisel commented on STANBOL-217:
----------------------------------------

I think it's better to implement a real async mode for the JobManager with the ability to register a job id that can be used to monitor progress and a callback to be notified when the job is done rather than hacking a streaming synchronous output that will render the current code much more complicated (we need to hardcode the content type, fork another thread, we cannot set the content length...)

> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> This is just on the browser side that the timeout occur, the engine continue to process.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068166#comment-13068166 ] 

Bertrand Delacretaz edited comment on STANBOL-217 at 7/20/11 6:18 AM:
----------------------------------------------------------------------

Instead of configuring timeouts, could the engines make sure something's written to the response at regular intervals, to avoid timing out?

[1] says " if a single byte is read or written, then the timeout (if implemented by jetty) is reset" so maybe just writing one space character to the output every 50 seconds or so would do. I haven't tried it, and buffers might get in the way, and that would add extra spaces to the output, so just a suggestion for now.

[1] http://jetty.codehaus.org/jetty/jetty-6/apidocs/org/mortbay/jetty/nio/SelectChannelConnector.html#setMaxIdleTime(int)

      was (Author: bdelacretaz):
    Instead of configuring timeouts, could the engines make sure something's written to the response at regular intervals, to avoid timing out?

[1] says " if a single byte is read or written, then the timeout (if implemented by jetty) is reset" so maybe just writing one space character to the output would do. I haven't tried it, and buffers might get in the way, and that would add extra spaces to the output, so just a suggestion for now.

[1] http://jetty.codehaus.org/jetty/jetty-6/apidocs/org/mortbay/jetty/nio/SelectChannelConnector.html#setMaxIdleTime(int)
  
> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> This is just on the browser side that the timeout occur, the engine continue to process.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Fabian Christ (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabian Christ resolved STANBOL-217.
-----------------------------------

    Resolution: Fixed

With the new JobManager implementation this should be solved.
                
> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> This is just on the browser side that the timeout occur, the engine continue to process.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Florent ANDRE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043365#comment-13043365 ] 

Florent ANDRE commented on STANBOL-217:
---------------------------------------

I don't really know all the infrastructure of Stanbol and I have no really idea where this "timeout" can be set. Any idea is welcome, I can try to invest a bit further.

> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Olivier Grisel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043887#comment-13043887 ] 

Olivier Grisel commented on STANBOL-217:
----------------------------------------

Maybe you can ask whether it would be possible to make that MaxIdleTime parameter configurable on the Apache Felix mailing list or jira.

> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> This is just on the browser side that the timeout occur, the engine continue to process.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Olivier Grisel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043386#comment-13043386 ] 

Olivier Grisel commented on STANBOL-217:
----------------------------------------

Stanbol itself does not implement any kind of timeout logic. The behavior you observer might come from the HTTPService implementation provided by Felix:

  https://svn.apache.org/repos/asf/felix/trunk/http.jetty/src/main/java/org/apache/felix/http/jetty/Activator.java

look for the line: connector.setMaxIdleTime( 60000 );

AFAIK there is know way to override this behavior using the public OSGi HTTPService configuration or API.

The solution is either use faster engines and restrict to engines that do not do synchronous lookup to remote network resources (e.g. prefil the EntiyHub with a precomputed SolrYard index of your knowledge base and use in offline mode) or do a POST request to the ContentHub API and do polling to fetch the results later. As noted earlier the current ContentHub implementation is a hack because of the use of the InMemoryStore for the content item streams.

> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> This is just on the browser side that the timeout occur, the engine continue to process.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Florent ANDRE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067975#comment-13067975 ] 

Florent ANDRE commented on STANBOL-217:
---------------------------------------

To have a configurable timeout while the Felix patch is not merge into trunk :

- checkout Felix trunk
- apply patch in FELIX-2687
- mvn build install the http/jetty module or all the Felix trunk
- update the org.apache.felix.http.jetty dependency in your launcher/pom.xml
- build your stanbol
- configure the http timeout property in the http bundle configuration

Enjoy !

> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> This is just on the browser side that the timeout occur, the engine continue to process.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (STANBOL-217) Plateform timeout when engine process more than 1 minute

Posted by "Florent ANDRE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066999#comment-13066999 ] 

Florent ANDRE commented on STANBOL-217:
---------------------------------------

linked to FELIX-2687 (patch provided).

As a side note, link provided by Olivier was on an outdated module (see FELIX-3044 ), but was a really great help and pointer.
Up to date http.jetty module is here : http://svn.apache.org/repos/asf/felix/trunk/http/jetty/


> Plateform timeout when engine process more than 1 minute
> --------------------------------------------------------
>
>                 Key: STANBOL-217
>                 URL: https://issues.apache.org/jira/browse/STANBOL-217
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Enhancer
>            Reporter: Florent ANDRE
>         Attachments: global-timeout.patch
>
>
> After a first mail [1], I do some clean and investigations, and it seems that a kind of timeout occur somewhere in the platform when engine processing take more than 1 minute.
> This seems not related to an uncaught Throwable or OutOfMemoryError, or at least nothing appear in the logs or console.
> This is just on the browser side that the timeout occur, the engine continue to process.
> With the use of this curl call : 
> time curl -m 600 -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" -F "data=@document-important" http://localhost:8080/engines
> Browser timeout can be an eliminate usual suspect as -m means :
>  -m/--max-time <seconds>
>               Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow
>               networks or links going down.  See also the --connect-timeout option.
> In order to test this well, I create an engine that do nothing more than wait. This engine is really simple, have just one parameter that allow to fix the wait period in ms. By default it's set to 1 minute (60000) that cause the bug. If you set this wait time lower (57000 for example), this work.
> 1 minute processing is important, but not huge if we consider big text files and a complete enhancement chain.
> [1] http://mail-archives.apache.org/mod_mbox/incubator-stanbol-dev/201105.mbox/%3C4DDBDE1E.7030602@4sengines.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira