Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036141
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2017-05-30 17:052017-06-08 17:12
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q3
StatusclosedFix in branchFixed in SCM revision0d4ef3abdea4
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036141: stateful WS calls create HttpSessions that live till Tomcat kills them

DescriptionWhenever a call to a stateful WebService is done, a new HttpSession is correctly created in Tomcat. This session is not automatically closed when request finalizes, so it's kept till Tomcat times it out (typically after one hour).

In instances with many WS requests this can potentially cause a high heap consumption.
Steps To Reproduce1. Enable debug logging in org.openbravo.erpCommon.security.SessionListener
2. Execute 1000 times http://localhost:8080/openbravo/ws/dal/Country/100 [^]
   -> Check logs: 1000 sessions are created and kept
3. Stop Tomcat
   -> Check logs: there are 100 lines like:
d05203b3 2550326 [localhost-startStop-2] INFO org.openbravo.erpCommon.security.SessionListener - Deactivated session: 4BC123C1CC9F40C0BCD387BBA1DD5179
4. Take a memory dump
   -> Check there are 1000 retained session objects retaining up to ~900KB
Proposed SolutionMake configurable interval after request completion to expire the session (defaulting it to 1 minute).
TagsPerformance
Attached Filesdiff file icon 36141.diff [^] (2,028 bytes) 2017-05-30 17:07 [Show Content]
png file icon Selection_187.png [^] (8,031 bytes) 2017-05-30 17:10

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0035994 closedcaristu Web service calls should not create ad_session entries being in an instance with unlimited web service calls 
related to design defect 0036162 acknowledgedTriage Platform Base clean up openbravo.log 

-  Notes
(0097022)
alostale (manager)
2017-05-30 17:16

Attached proposed solution
(0097084)
hgbot (developer)
2017-06-01 17:13

Repository: erp/devel/pi
Changeset: 0d4ef3abdea42bf29136282daccb0753c96420f9
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jun 01 16:58:38 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0d4ef3abdea42bf29136282daccb0753c96420f9 [^]

fixed bug 36141: stateful WS calls create long lived HttpSessions

  - Now expiration time for sessions in WS calls is configurable through
    ws.maxInactiveInterval property, which defaults to 1 minute
  - Removed log while destroying context to just summarize number of sessions
    to deactive from DB + spent time.

---
M src/org/openbravo/erpCommon/security/SessionListener.java
M src/org/openbravo/service/web/BaseWebServiceServlet.java
---
(0097131)
hgbot (developer)
2017-06-05 13:40

Repository: erp/devel/pi
Changeset: 864ef8d7eee8c1bcb84a70cdb9196ec3ef98d959
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Jun 05 13:38:50 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/864ef8d7eee8c1bcb84a70cdb9196ec3ef98d959 [^]

related to bug 36141: use variable instead of invoking the method again

---
M src/org/openbravo/service/web/BaseWebServiceServlet.java
---
(0097132)
caristu (developer)
2017-06-05 13:40

Code reviewed + testing OK.
(0097234)
hudsonbot (developer)
2017-06-08 17:12

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/fda0f16ab470 [^]
Maturity status: Test
(0097240)
hudsonbot (developer)
2017-06-08 17:12

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/fda0f16ab470 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-05-30 17:05 alostale New Issue
2017-05-30 17:05 alostale Assigned To => platform
2017-05-30 17:05 alostale Modules => Core
2017-05-30 17:05 alostale Triggers an Emergency Pack => No
2017-05-30 17:05 alostale Relationship added related to 0035994
2017-05-30 17:07 alostale File Added: 36141.diff
2017-05-30 17:07 alostale Tag Attached: Performance
2017-05-30 17:10 alostale File Added: Selection_187.png
2017-05-30 17:12 alostale Steps to Reproduce Updated View Revisions
2017-05-30 17:16 alostale Note Added: 0097022
2017-05-31 10:41 alostale Summary statefull WS calls create HttpSessions that live till Tomcat kills them => stateful WS calls create HttpSessions that live till Tomcat kills them
2017-05-31 10:41 alostale Description Updated View Revisions
2017-06-01 16:52 alostale Proposed Solution updated
2017-06-01 16:52 alostale Assigned To platform => alostale
2017-06-01 16:53 alostale Review Assigned To => caristu
2017-06-01 17:13 hgbot Checkin
2017-06-01 17:13 hgbot Note Added: 0097084
2017-06-01 17:13 hgbot Status new => resolved
2017-06-01 17:13 hgbot Resolution open => fixed
2017-06-01 17:13 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0d4ef3abdea42bf29136282daccb0753c96420f9 [^]
2017-06-01 17:16 alostale Relationship added duplicate of 0036162
2017-06-01 17:16 alostale Relationship replaced related to 0036162
2017-06-05 10:06 caristu Note Added: 0097120
2017-06-05 10:06 caristu Status resolved => closed
2017-06-05 10:06 caristu Fixed in Version => 3.0PR17Q3
2017-06-05 13:40 hgbot Checkin
2017-06-05 13:40 hgbot Note Added: 0097131
2017-06-05 13:40 caristu Note Deleted: 0097120
2017-06-05 13:40 caristu Note Added: 0097132
2017-06-08 17:12 hudsonbot Checkin
2017-06-08 17:12 hudsonbot Note Added: 0097234
2017-06-08 17:12 hudsonbot Checkin
2017-06-08 17:12 hudsonbot Note Added: 0097240


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker