Queue: PublicMetaMap
Subject: mmserver13 dies with SPIO_E_TOO_MANY_OPEN_FILES
Status: resolved
Created: Mon Nov 04 13:13:12 2013
Resolved: Tue Nov 05 16:44:38 2013
LastUpdated: Tue Nov 05 16:44:38 2013

Subject: 
Creator: 28
Created: 2013-11-04 18:13:12
Transaction: 1988
Parent: 0
MessageId: [email redacted]
Filename: 
ContentType: text/plain
ContentEncoding: none

Content: 
         >Category: mmtxT
         >Synopsis: mmserver13 dies with SPIO_E_TOO_MANY_OPEN_FILES
         >Confidential: no
         >Severity: serious
         >Priority: medium
         >Class: sw-bug
         >Submitter-Id: mmtxWeb
         >Release: 
         >Environment:
         >Operating System - MetaMap: 
         >OS Version - 3.11.2-201.fc19.x86_64 (Fedora Core 19)
         >Java Version - Java 1.7
         >Description:
         MMserver 2013 will eventually die from having too many open pipes when being called by the Java API from a remote host: 
         
         (snip)
         Established connection $stream(-227805152) to WSD Server on localhost.
         Established connection $stream(-227875744) to TAGGER Server on localhost.
         Established connection $stream(-227875600) to WSD Server on localhost.
         ! [PBEANS] - prologbeans could not handle data_received('$pbstream'('$stream'(-227876488),'$stream'(-227876488))): error(system_error,system_error('SPIO_E_TOO_MANY_OPEN_FILES'))
         ! [PBEANS] - listen error: error(system_error,system_error('SPIO_E_TOO_MANY_OPEN_FILES'))
         ! System error
         ! 'SPIO_E_TOO_MANY_OPEN_FILES'
         ! System error
         ! 'SPIO_E_TOO_MANY_OPEN_FILES'
         
         ..and it has to be restarted. Watching the /proc//fd/ directory, pipes are created but never removed. When it hits 1000 pipes then the process dies. I could increase the FD limit but this will only delay the problem for a short while. 
         
         MMserver is running on a Fedora Core 19 VM with 8GB RAM and Sun JDK 1.7.0_45 (32-bit)
         
         >How-To-Repeat:
         Example use of Java API on Mac workstation: 
                     MetaMapApi api = new MetaMapApiImpl(mapServer.toString())
                     api.resetOptions()
                     api.setOptions("-y -R SNOMEDCT");
                     map = api.processCitationsFromString(text)
                     (do stuff with map)
                     api.getSession().disconnect()
         
         Calling the above 113 times kills mmserver with error SPIO_E_TOO_MANY_OPEN_FILES
         
         >Unformatted:




Subject: 
Creator: 28
Created: 2013-11-04 21:55:37
Transaction: 1996
Parent: 0
MessageId: [email redacted]
Filename: 
ContentType: text/html
ContentEncoding: none

Content: It appears that MMServer/MetaMap is retaining the pipe when calling the WSD Server.   The behavior does not occur if WSD is not used.

I will have the main MetaMap developer take a look at this.

Sincerely,
Willie Rogers

On Mon Nov 04 13:13:12 2013, wjrogers wrote:
>
> >Submitter: [email redacted]
> >Category: mmtxT
> >Synopsis: mmserver13 dies with SPIO_E_TOO_MANY_OPEN_FILES
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Class: sw-bug
> >Submitter-Id: mmtxWeb
> >Originator: Joe Mesterhazy ([email redacted])
> >Release:
> >Environment:
> >Operating System - MetaMap:
> >OS Version - 3.11.2-201.fc19.x86_64 (Fedora Core 19)
> >Java Version - Java 1.7
> >Description:
> MMserver 2013 will eventually die from having too many open pipes when
> being called by the Java API from a remote host:
>
> (snip)
> Established connection $stream(-227805152) to WSD Server on localhost.
> Established connection $stream(-227875744) to TAGGER Server on
> localhost.
> Established connection $stream(-227875600) to WSD Server on localhost.
> ! [PBEANS] - prologbeans could not handle
> data_received('$pbstream'('$stream'(-227876488),'$stream'(-
> 227876488))):
> error(system_error,system_error('SPIO_E_TOO_MANY_OPEN_FILES'))
> ! [PBEANS] - listen error:
> error(system_error,system_error('SPIO_E_TOO_MANY_OPEN_FILES'))
> ! System error
> ! 'SPIO_E_TOO_MANY_OPEN_FILES'
> ! System error
> ! 'SPIO_E_TOO_MANY_OPEN_FILES'
>
> ..and it has to be restarted. Watching the /proc/<PID>/fd/ directory,
> pipes are created but never removed. When it hits 1000 pipes then
> the process dies. I could increase the FD limit but this will only
> delay the problem for a short while.
>
> MMserver is running on a Fedora Core 19 VM with 8GB RAM and Sun JDK
> 1.7.0_45 (32-bit)
>
> >How-To-Repeat:
> Example use of Java API on Mac workstation:
> MetaMapApi api = new MetaMapApiImpl(mapServer.toString())
> api.resetOptions()
> api.setOptions("-y -R SNOMEDCT");
> map = api.processCitationsFromString(text)
> (do stuff with map)
> api.getSession().disconnect()
>
> Calling the above 113 times kills mmserver with error
> SPIO_E_TOO_MANY_OPEN_FILES
>
> >Unformatted:


Subject: [PublicMetamap #50] mmserver13 dies with SPIO_E_TOO_MANY_OPEN_FILES 
Creator: 1
Created: 2013-11-04 21:55:37
Transaction: 1997
Parent: 0
MessageId: [email redacted]
Filename: 
ContentType: text/plain
ContentEncoding: none

Content: It appears that MMServer/MetaMap is retaining the pipe when calling the WSD
         Server. The behavior does not occur if WSD is not used.
         
         I will have the main MetaMap developer take a look at this.
         
         Sincerely,
         Willie Rogers
         
         On Mon Nov 04 13:13:12 2013, wjrogers wrote:
         >
         > >Category: mmtxT
         > >Synopsis: mmserver13 dies with SPIO_E_TOO_MANY_OPEN_FILES
         > >Confidential: no
         > >Severity: serious
         > >Priority: medium
         > >Class: sw-bug
         > >Submitter-Id: mmtxWeb
         > >Release:
         > >Environment:
         > >Operating System - MetaMap:
         > >OS Version - 3.11.2-201.fc19.x86_64 (Fedora Core 19)
         > >Java Version - Java 1.7
         > >Description:
         > MMserver 2013 will eventually die from having too many open pipes when
         > being called by the Java API from a remote host:
         >
         > (snip)
         > Established connection $stream(-227805152) to WSD Server on localhost.
         > Established connection $stream(-227875744) to TAGGER Server on
         > localhost.
         > Established connection $stream(-227875600) to WSD Server on localhost.
         > ! [PBEANS] - prologbeans could not handle
         > data_received('$pbstream'('$stream'(-227876488),'$stream'(-
         > 227876488))):
         > error(system_error,system_error('SPIO_E_TOO_MANY_OPEN_FILES'))
         > ! [PBEANS] - listen error:
         > error(system_error,system_error('SPIO_E_TOO_MANY_OPEN_FILES'))
         > ! System error
         > ! 'SPIO_E_TOO_MANY_OPEN_FILES'
         > ! System error
         > ! 'SPIO_E_TOO_MANY_OPEN_FILES'
         >
         > ..and it has to be restarted. Watching the /proc//fd/ directory,
         > pipes are created but never removed. When it hits 1000 pipes then
         > the process dies. I could increase the FD limit but this will only
         > delay the problem for a short while.
         >
         > MMserver is running on a Fedora Core 19 VM with 8GB RAM and Sun JDK
         > 1.7.0_45 (32-bit)
         >
         > >How-To-Repeat:
         > Example use of Java API on Mac workstation:
         > MetaMapApi api = new MetaMapApiImpl(mapServer.toString())
         > api.resetOptions()
         > api.setOptions("-y -R SNOMEDCT");
         > map = api.processCitationsFromString(text)
         > (do stuff with map)
         > api.getSession().disconnect()
         >
         > Calling the above 113 times kills mmserver with error
         > SPIO_E_TOO_MANY_OPEN_FILES
         >
         > >Unformatted:
         



Subject: [PublicMetamap #50] mmserver13 dies with SPIO_E_TOO_MANY_OPEN_FILES 
Creator: 1
Created: 2013-11-04 21:55:37
Transaction: 1998
Parent: 0
MessageId: [email redacted]
Filename: 
ContentType: text/plain
ContentEncoding: none

Content: It appears that MMServer/MetaMap is retaining the pipe when calling the WSD
         Server. The behavior does not occur if WSD is not used.
         
         I will have the main MetaMap developer take a look at this.
         
         Sincerely,
         Willie Rogers
         
         On Mon Nov 04 13:13:12 2013, wjrogers wrote:
         >
         > >Category: mmtxT
         > >Synopsis: mmserver13 dies with SPIO_E_TOO_MANY_OPEN_FILES
         > >Confidential: no
         > >Severity: serious
         > >Priority: medium
         > >Class: sw-bug
         > >Submitter-Id: mmtxWeb
         > >Release:
         > >Environment:
         > >Operating System - MetaMap:
         > >OS Version - 3.11.2-201.fc19.x86_64 (Fedora Core 19)
         > >Java Version - Java 1.7
         > >Description:
         > MMserver 2013 will eventually die from having too many open pipes when
         > being called by the Java API from a remote host:
         >
         > (snip)
         > Established connection $stream(-227805152) to WSD Server on localhost.
         > Established connection $stream(-227875744) to TAGGER Server on
         > localhost.
         > Established connection $stream(-227875600) to WSD Server on localhost.
         > ! [PBEANS] - prologbeans could not handle
         > data_received('$pbstream'('$stream'(-227876488),'$stream'(-
         > 227876488))):
         > error(system_error,system_error('SPIO_E_TOO_MANY_OPEN_FILES'))
         > ! [PBEANS] - listen error:
         > error(system_error,system_error('SPIO_E_TOO_MANY_OPEN_FILES'))
         > ! System error
         > ! 'SPIO_E_TOO_MANY_OPEN_FILES'
         > ! System error
         > ! 'SPIO_E_TOO_MANY_OPEN_FILES'
         >
         > ..and it has to be restarted. Watching the /proc//fd/ directory,
         > pipes are created but never removed. When it hits 1000 pipes then
         > the process dies. I could increase the FD limit but this will only
         > delay the problem for a short while.
         >
         > MMserver is running on a Fedora Core 19 VM with 8GB RAM and Sun JDK
         > 1.7.0_45 (32-bit)
         >
         > >How-To-Repeat:
         > Example use of Java API on Mac workstation:
         > MetaMapApi api = new MetaMapApiImpl(mapServer.toString())
         > api.resetOptions()
         > api.setOptions("-y -R SNOMEDCT");
         > map = api.processCitationsFromString(text)
         > (do stuff with map)
         > api.getSession().disconnect()
         >
         > Calling the above 113 times kills mmserver with error
         > SPIO_E_TOO_MANY_OPEN_FILES
         >
         > >Unformatted:
         



Subject: 
Creator: 28
Created: 2013-11-05 21:44:37
Transaction: 2000
Parent: 0
MessageId: [email redacted]
Filename: 
ContentType: text/html
ContentEncoding: none

Content: After consulting the lead MetaMap developer, I've built a new mmserver  binary which does NOT re-open the WSD server repeatedly.   There is a  caveat however, 
once you set the WSD option (-y) in mmserver, it cannot be unset.

The macosx and linux distributions with the new binaries are available at:

http://metamap.nlm.nih.gov/download/public_mm_darwin_javaapi_2013.tar.bz2
http://metamap.nlm.nih.gov/download/public_mm_linux_javaapi_2013.tar.bz2

MD5 checksums for the new archives are:

e5a046f4c7e194b247ec6af275124caa  public_mm_darwin_javaapi_2013.tar.bz2
09132d9d0bf31eacfab8851295ed91a2  public_mm_linux_javaapi_2013.tar.bz2

Sincerely,
Willie Rogers
Subject: [PublicMetamap #50] mmserver13 dies with SPIO_E_TOO_MANY_OPEN_FILES 
Creator: 1
Created: 2013-11-05 21:44:38
Transaction: 2001
Parent: 0
MessageId: [email redacted]
Filename: 
ContentType: text/plain
ContentEncoding: none

Content: After consulting the lead MetaMap developer, I've built a new mmserver binary
         which does NOT re-open the WSD server repeatedly. There is a caveat however,
         once you set the WSD option (-y) in mmserver, it cannot be unset.
         
         The macosx and linux distributions with the new binaries are available at:
         
         http://metamap.nlm.nih.gov/download/public_mm_darwin_javaapi_2013.tar.bz2
         http://metamap.nlm.nih.gov/download/public_mm_linux_javaapi_2013.tar.bz2
         
         MD5 checksums for the new archives are:
         
         e5a046f4c7e194b247ec6af275124caa public_mm_darwin_javaapi_2013.tar.bz2
         09132d9d0bf31eacfab8851295ed91a2 public_mm_linux_javaapi_2013.tar.bz2
         
         Sincerely,
         Willie Rogers