Tomcat Timeout Setting in Catalina_Opts

389 views
Skip to first unread message

Michael

unread,
Jul 11, 2016, 11:54:28 AM7/11/16
to uPortal Community
I am trying to have the TCP connection timeout system properties set in CATALINA_OPTS.


https://wiki.jasig.org/display/UPC/JVM+Configurations (at the top of page)

There are 4 different ways I have tried implementing connection timeout in system properties:

  1. A new file was created in the tomcat bin directory titled setenv.sh and added "-Dsun.net.client.defaultConnectTimeout=20000 -Dsun.net.client.defaultReadTimeout=240000" to CATALINA_OPTS

  2. I have tried adding these timeout properties to my .zshrc and assigning them to CATALINA_OPTS

  3. Adding these properties directly into catalina.sh (in the tomcat bin directory) also did not work.

  4. Finally, I have tried adding these properties to the build.xml file in uportal as a value for the CATALINA_OPTS env key.


I cannot seem to get this to work, so I am hoping someone can give me some insight into what I am doing wrong. 

Thank You,
Michael Frieze


Benito J. Gonzalez

unread,
Jul 11, 2016, 12:59:10 PM7/11/16
to uPortal Community
Hi Michael,

Would you mind sharing your setenv.sh file? Do you see those properties in catalina.out around startup of Tomcat?

Benito J. Gonzalez
Software Developer
Unicon, Inc.
Voice:  480.558.2360
 Text:  209.777.2754
GitHub:  bjagg
BitBucket:  bjagg



--
You received this message because you are subscribed to the Google Groups "uPortal Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uportal-user...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/uportal-user/.

Michael

unread,
Jul 11, 2016, 2:20:23 PM7/11/16
to uPortal Community, bgon...@unicon.net

I do find these settings multiple times throughout catalina.out, but it is never set to the value's that I have set in setenv.sh

my setenv.sh file is attached. 
setenv.sh

Benito J. Gonzalez

unread,
Jul 11, 2016, 2:30:02 PM7/11/16
to Michael, uPortal Community
Are you attempting to set timeouts for web connections to Tomcat? See https://tomcat.apache.org/tomcat-8.0-doc/config/http.html for setting connection timeouts on Tomcat connectors.

I think those settings would come into play if you are accessing a remote server with custom code.

Benito J. Gonzalez
Software Developer
Unicon, Inc.
Voice:  480.558.2360
 Text:  209.777.2754
GitHub:  bjagg
BitBucket:  bjagg



<setenv.sh>

Reply all
Reply to author
Forward
0 new messages