You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by GitBox <gi...@apache.org> on 2020/02/13 16:47:02 UTC

[GitHub] [synapse] madhawa-gunasekara opened a new pull request #23: Fix SYNAPSE-1106

madhawa-gunasekara opened a new pull request #23: Fix SYNAPSE-1106
URL: https://github.com/apache/synapse/pull/23
 
 
   MessageContext class store messageContext object in a ThreadLocalVariable where it doesn't clear created ThreadLocal variables properly. Therefore synapse passthrough threads contain created the Theadlocal variable which refers to the created soap envelope during the mediation level. Because of the retained ThreadLocal variables, Passthrough threads consumes a huge amount of memory which leads to OOM.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[GitHub] [synapse] isudana merged pull request #23: Fix SYNAPSE-1106

Posted by GitBox <gi...@apache.org>.
isudana merged pull request #23: Fix SYNAPSE-1106
URL: https://github.com/apache/synapse/pull/23
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[GitHub] [synapse] isudana commented on a change in pull request #23: Fix SYNAPSE-1106

Posted by GitBox <gi...@apache.org>.
isudana commented on a change in pull request #23: Fix SYNAPSE-1106
URL: https://github.com/apache/synapse/pull/23#discussion_r384256406
 
 

 ##########
 File path: modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/passthru/ServerWorker.java
 ##########
 @@ -107,110 +107,114 @@ public ServerWorker(final SourceRequest request,
     }
 
     public void run() {
-        if (log.isDebugEnabled()) {
-            log.debug("Starting a new Server Worker instance");
-        }
-        ConfigurationContext cfgCtx = sourceConfiguration.getConfigurationContext();        
-        msgContext.setProperty(Constants.Configuration.HTTP_METHOD, request.getMethod());
-
-        String method = request.getRequest() != null ?
-                request.getRequest().getRequestLine().getMethod().toUpperCase() : "";
-        
-        String uri = request.getUri();
-        String oriUri = uri;
-        
-        if (uri.contains(cfgCtx.getServicePath())) {
-            // discard up to servicePath
-            uri = uri.substring(uri.indexOf(cfgCtx.getServicePath()) +
-                    cfgCtx.getServicePath().length());
-            // discard [proxy] service name if any
-            int pos = uri.indexOf("/", 1);
-            if (pos > 0) {
-                uri = uri.substring(pos);
-            } else {
-                pos = uri.indexOf("?");
-                if (pos != -1) {
+        try {
 
 Review comment:
   Please do not do code formatting in the entire class while sending fixes, it makes really hard to see the actual change you have done.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[GitHub] [synapse] madhawa-gunasekara commented on a change in pull request #23: Fix SYNAPSE-1106

Posted by GitBox <gi...@apache.org>.
madhawa-gunasekara commented on a change in pull request #23: Fix SYNAPSE-1106
URL: https://github.com/apache/synapse/pull/23#discussion_r385136910
 
 

 ##########
 File path: modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/passthru/ServerWorker.java
 ##########
 @@ -107,110 +107,114 @@ public ServerWorker(final SourceRequest request,
     }
 
     public void run() {
-        if (log.isDebugEnabled()) {
-            log.debug("Starting a new Server Worker instance");
-        }
-        ConfigurationContext cfgCtx = sourceConfiguration.getConfigurationContext();        
-        msgContext.setProperty(Constants.Configuration.HTTP_METHOD, request.getMethod());
-
-        String method = request.getRequest() != null ?
-                request.getRequest().getRequestLine().getMethod().toUpperCase() : "";
-        
-        String uri = request.getUri();
-        String oriUri = uri;
-        
-        if (uri.contains(cfgCtx.getServicePath())) {
-            // discard up to servicePath
-            uri = uri.substring(uri.indexOf(cfgCtx.getServicePath()) +
-                    cfgCtx.getServicePath().length());
-            // discard [proxy] service name if any
-            int pos = uri.indexOf("/", 1);
-            if (pos > 0) {
-                uri = uri.substring(pos);
-            } else {
-                pos = uri.indexOf("?");
-                if (pos != -1) {
+        try {
 
 Review comment:
   Noted 👍 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org