2 Replies Latest reply on Jul 22, 2014 11:00 AM by Paul F

    JBoss AS 7.1.1 HTTP server shuts down

    Paul F Newbie

      Ok, really bizarre behavior here.  We have a background thread scanning the file system using the Java WatchService API.  It occasionally processes CSV files around 3.5 Mb (10,000) rows - this takes about 5s.  AFTER it does this ONE TIME, the server no longer responds to any HTTP requests to the deployed web app this is running it - any client gets a 0 NO RESPONSE.  The server has to be bounced.  There are NO error or warning messages of any kind.


      I know creating a background thread manually is not Nice JEE but this sort of thing works fine on any other server, including other versions of JBoss.


      Anybody have any ideas at all?

        • 1. Re: JBoss AS 7.1.1 HTTP server shuts down
          Paul F Newbie

          I have a bit more information, which should reduce the need to resort to divining chicken entrails for those attempting to answer this question.


          Unfortunately, this information probably makes it only a little bit simpler to diagnose this issue.  Here it is: We are using MySQL, and doing inserts during the file processing referenced above, and running the query "select LAST_INSERT_ID()" in order to obtain the id of the last inserted row.


          *** If that LAST_INSERT_ID query is removed, there are no issues.  But, if it runs - and it runs generally a few dozen times in the transaction that this file processing code starts - the server no longer responds to HTTP requests afterwards. ***


          Pretty wacky stuff, eh?


          I am certain that:


          - There are no issues with transaction management.  (All manuals - all BMP - and we happen to be using the Typesafe Slick library.)


          - There are no issues of any kind with threading (there is actually only a single thread involved here).


          I've also eliminated the user-initiated thread as a possible culprit by kicking the thing off with a JEE TimerService event instead.

          • 2. Re: JBoss AS 7.1.1 HTTP server shuts down
            Paul F Newbie

            Problem solved.  Short version is that we were loading a properties file inside a tight loop and running out of file handles.


            On Mac OS, there is NO error or warning message - even with full debug - making this quite mysterious.


            Running the same code on RH Linux, JBoss dutifully reports "too many files", making it a breeze to track down.


            The universe makes sense after all.