What to do if you get a java.io.IOException in GlassFish

--Environment - Red Hat Enterprise Linux Server release 6.3 (Santiago) - java version "1.7.0_79" - GlassFish 4.1

Event: java.io.IOException occurred while processing a large amount of data with GlassFish

[2020/05/21 17:41:07.805][656b5aef53f][][FATAL] - java.io.IOException: java.lang.InterruptedException
org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:92)
org.glassfish.grizzly.filterchain.TransportFilter.handleRead(TransportFilter.java:173)
org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351)
org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:695)
org.glassfish.grizzly.http.io.InputBuffer.blockingRead(InputBuffer.java:1119)
org.glassfish.grizzly.http.server.io.ServerInputBuffer.blockingRead(ServerInputBuffer.java:95)
org.glassfish.grizzly.http.io.InputBuffer.fill(InputBuffer.java:1143)
org.glassfish.grizzly.http.io.InputBuffer.read(InputBuffer.java:353)
org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:267)
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:270)
sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
java.io.InputStreamReader.read(InputStreamReader.java:184)
java.io.BufferedReader.fill(BufferedReader.java:154)
java.io.BufferedReader.readLine(BufferedReader.java:317)
java.io.BufferedReader.readLine(BufferedReader.java:382)
...abridgement...

Cause: The application execution time has timed out

The problem was that I didn't specify the setting configs.config.network-config.protocols.protocol.http.request-timeout-seconds to set the execution time of the application.

The default timeout for Glassfish is 15 minutes. This can happen in a variety of situations. For example, if the request fires a long-running action that does not respond within the timeout period, the request to the server is made over HTTPS and only HTTP (or vice versa) is supported in the HTTP connection pool. For example, if there are no more connections available. java - GRIZZLY0023 Glassfish warning - Stack Overflow

Action: Set http.request-timeout-seconds in domain.xml

This time, the timeout was 15 minutes because it was not set, so I set it to unlimited "-1".

domain.xml


  <configs>
    <config name="server-config">
      <network-config>
        <protocols>
          <protocol name="http-listener-1">
            <http max-post-size-bytes="20971520" default-virtual-server="server" max-connections="250" request-timeout-seconds="-1">

When setting on the GlassFish management screen (http: // localhost: 4848), server-config> Network Config> Network Listeners> {Target Listener}> [HTTP] tab>Request Timeout: image.png

It seems that "-1" cannot be set from Glassfish 3.1.2, but when I set it, java.io.IOException no longer occurs ... But when I look at the management screen, the initial value is 900 seconds (15 minutes). ···Strange

Unfortunately you can't set it to -1 to have no limit since Glassfish 3.1.2. java - GRIZZLY0023 Glassfish warning - Stack Overflow

Can Payara do it?

Recommended Posts

What to do if you get a java.io.IOException in GlassFish
What to do if you get a gcc error in Docker
What to do if you get a DISPLAY error in gym.render ()
What to do if you get a groovy warning in Thymeleaf Layout
What to do if you get a wrong number of arguments error in binding.pry
What to do if you get a "302" error in your controller unit test code in Rails
What to do if you get a MiniMagick vulnerability alert on GitHub
What to do if you accidentally create a model
What to do if you get a "Mysql2 :: Error: Operand should contain 1 column (s)" error in Rails
What to do if you get a JNI shared library error when trying to build in Eclipse
What to do if you get a SQLite3 :: BusyException: database is locked error
What to do if you install Ubuntu
What to do if you can't get the text of an element in Selenium
What to do if you get a NoClassDefFoundError when trying to run eclipse on Java9
What to do if you get a port error when docker-compose up on Mac
What to do if you get a javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake in the IBM JDK
What to do if you get Could not save master table to file after importing a project in Eclipse
What to do if you get angry with OpenSSL with pyenv install
What to do if you forget the root password in CentOS7
[Rails] What to do if you can't get parameters with form_with
What to do if you get a "Cannot Pull Container Error" when starting ECS ​​Fargate
What to do if you get an error in Basic authentication during Rails test code
What to do if you push incorrect information
What to do if you get an error during rails db: reset
What to do if you get an uninitialized constant Likes Controller error
What to do if you get an error when you hit Heroku logs
What to do if you get an [An HTTP request took too long to complete.] Error in Docker.
How to make a jar with old Hadoop (hadoop-core-0.20.2-cdh3u6) in Gradle: (What to do if you get Could not expand ZIP ..)
What to do if you select a JRE in Eclipse and get "The selected JRE does not support the current compliance level 11"
What to do if password authentication fails in Docker/Postgres
What to do if you get Could not locate Gemfile or .bundle / directory
What to do if you get the error message unrecognized selector send to instance "***"
What to do if you get an error on heroku rake db: migrate
What to do if you get angry if you don't have nokogiri while installing wp2txt
What to do if you get To install the missing version, run `gem install bundler: 2.1.4`
What to do if you get an error with bundle install by entering gem'bcrypt' in your Gemfile
What to do if you get Application with name appName is already registered. When you try to start GlassFish
What to do if Operation not permitted is displayed when you execute a command in the terminal
What to do if you get an "A server is already running." Error when you try to start the rails server
# What to do if you accidentally do rails db: migrate: drop
What to do if you get the error Couldn't find Item without an ID
What to do if mysql2 gets a bundle install error
What to do if you can't use the rails command
[Java] What to do if you get an error in Eclipse saying "Not allowed at source level below 1.X"
What to do if you get an Argument Error: wrong number of arguments (given 2, expected 0) in your RSpec test
What to do if you get an error saying "Please enter a valid value" when getting with Rails datetime_field
What to do if you get an error saying "Could not find a JavaScript runtime." When starting rails server
[Solution] What to do if you get a Docker error'ERROR: Cannot connect to the Docker daemon at unix: ///var/run/docker.sock. Is the docker daemon running?'
What to do if you get the warning "Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1." in Rails 6.0
What to do if you don't see the test code error message in the terminal console
[Rails] What to do if you accidentally install bundle in the production environment in your local environment
[Rails Tutorial Chapter 2] What to do when you make a mistake in the column name
[Rails] What to do if you can't get an error message with the errors method
What you need to do to open a file from the menu in the document-Based App macOS app
[Rails] What to do if data is not registered in DB
What to do if the Rails page doesn't appear in Rails tutorial 1.3.2
What to do if Cloud9 is full in the Rails tutorial
What to do when you become a Problem During Content Assist
What to do when you run into a docker-compose node_modules problem
What to do if you cannot roll back the migration (UnknownMigrationVersionError)
What to do when a javax.el.PropertyNotWritableException occurs