You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/06/19 17:19:41 UTC

[GitHub] [nifi] markap14 opened a new pull request #4353: NIFI-7566: Avoid using Thread.sleep() to wait for Site-to-Site connec…

markap14 opened a new pull request #4353:
URL: https://github.com/apache/nifi/pull/4353


   …tion to be handled. Instead, use TimeUnit.timedWait and use Object.notifyAll when setting the beingServiced flag. This significantly reduces latency and improves throughput for small-batch site-to-site communications
   
   Thank you for submitting a contribution to Apache NiFi.
   
   Please provide a short description of the PR here:
   
   #### Description of PR
   
   _Enables X functionality; fixes bug NIFI-YYYY._
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
        in the commit message?
   
   - [ ] Does your PR title start with **NIFI-XXXX** where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically `master`)?
   
   - [ ] Is your initial contribution a single, squashed commit? _Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not `squash` or use `--force` when pushing to allow for clean monitoring of changes._
   
   ### For code changes:
   - [ ] Have you ensured that the full suite of tests is executed via `mvn -Pcontrib-check clean install` at the root `nifi` folder?
   - [ ] Have you written or updated unit tests to verify your changes?
   - [ ] Have you verified that the full build is successful on JDK 8?
   - [ ] Have you verified that the full build is successful on JDK 11?
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
   - [ ] If applicable, have you updated the `LICENSE` file, including the main `LICENSE` file under `nifi-assembly`?
   - [ ] If applicable, have you updated the `NOTICE` file, including the main `NOTICE` file found under `nifi-assembly`?
   - [ ] If adding new Properties, have you added `.displayName` in addition to .name (programmatic access) for each of the new properties?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible.
   


----------------------------------------------------------------
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



[GitHub] [nifi] gruselglatz commented on pull request #4353: NIFI-7566: Avoid using Thread.sleep() to wait for Site-to-Site connec…

Posted by GitBox <gi...@apache.org>.
gruselglatz commented on pull request #4353:
URL: https://github.com/apache/nifi/pull/4353#issuecomment-881938357


   IDK if this is a fix for you, but we changed every connection for RPGs to RAW, which gave us a better performance, less CPU overhead and when large flowfiles being sent, the input won't get stuck anymore.
   
   When you need HTTP as protocol, put a split record or something which can split your flowfile into smaller bits in front of your RPG output. IDK what the correct max size is, but we saw constant stucks for files bigger then 10 MB sometimes 50 MB and 100 MB....
   
   I hope it helps a little bit?


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] asfgit closed pull request #4353: NIFI-7566: Avoid using Thread.sleep() to wait for Site-to-Site connec…

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #4353:
URL: https://github.com/apache/nifi/pull/4353


   


----------------------------------------------------------------
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



[GitHub] [nifi] meeran0823 commented on pull request #4353: NIFI-7566: Avoid using Thread.sleep() to wait for Site-to-Site connec…

Posted by GitBox <gi...@apache.org>.
meeran0823 commented on pull request #4353:
URL: https://github.com/apache/nifi/pull/4353#issuecomment-878977033


   we are also facing the same issue with RPG's remote connection thread getting stuck since we upgraded to 1.13.0, is there a work fix or work around for this? and also the RPG's count is not showing up correctly on canvas and Process Groups


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] markap14 commented on pull request #4353: NIFI-7566: Avoid using Thread.sleep() to wait for Site-to-Site connec…

Posted by GitBox <gi...@apache.org>.
markap14 commented on pull request #4353:
URL: https://github.com/apache/nifi/pull/4353#issuecomment-647814038


   Thanks @alopresto!


----------------------------------------------------------------
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



[GitHub] [nifi] pvillard31 commented on pull request #4353: NIFI-7566: Avoid using Thread.sleep() to wait for Site-to-Site connec…

Posted by GitBox <gi...@apache.org>.
pvillard31 commented on pull request #4353:
URL: https://github.com/apache/nifi/pull/4353#issuecomment-801760105


   @gruselglatz - please file a JIRA for this, this will be better tracked


----------------------------------------------------------------
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



[GitHub] [nifi] alopresto commented on pull request #4353: NIFI-7566: Avoid using Thread.sleep() to wait for Site-to-Site connec…

Posted by GitBox <gi...@apache.org>.
alopresto commented on pull request #4353:
URL: https://github.com/apache/nifi/pull/4353#issuecomment-646883990


   Thanks Mark. The Windows test failure is code I recently added which happened to be 0.01% outside the expected threshold because of recent degraded performance of the Windows servers. We've seen this with other timing-dependent tests failing recently. The other platforms all handled the build fine. I'll increase the threshold on that one in another ticket. 
   
   Ran `contrib-check` and all tests pass. +1, merging. 


----------------------------------------------------------------
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



[GitHub] [nifi] gruselglatz commented on pull request #4353: NIFI-7566: Avoid using Thread.sleep() to wait for Site-to-Site connec…

Posted by GitBox <gi...@apache.org>.
gruselglatz commented on pull request #4353:
URL: https://github.com/apache/nifi/pull/4353#issuecomment-801684955


   @alopresto Since we upgraded to 1.13.1 we cant get any stable input connection and seeing this stacktrace all the time. After x threads the threads stuck indefinitely:
   
   ![grafik](https://user-images.githubusercontent.com/15243394/111586091-9ba9d000-87c0-11eb-8c75-962cf03f5d5a.png)
   
   
   ```
   2021-03-18 07:33:34,703 ERROR [NiFi Web Server-18] o.a.nifi.web.api.ApplicationResource Unexpected exception occurred. portId=c4d93fb6-5e5b-1382-b39b-66fbc04660f0
   2021-03-18 07:33:34,703 ERROR [NiFi Web Server-18] o.a.nifi.web.api.ApplicationResource Exception detail:
   org.apache.nifi.processor.exception.ProcessException: org.apache.nifi.processor.exception.ProcessException: Interrupted while waiting for site-to-site request to be serviced
           at org.apache.nifi.remote.StandardPublicPort.receiveFlowFiles(StandardPublicPort.java:588)
           at org.apache.nifi.web.api.DataTransferResource.receiveFlowFiles(DataTransferResource.java:277)
           at sun.reflect.GeneratedMethodAccessor198.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
           at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
           at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
           at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:200)
           at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
           at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
           at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
           at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
           at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
           at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
           at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
           at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
           at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
           at org.glassfish.jersey.internal.Errors.process(Errors.java:268)
           at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
           at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
           at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
           at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)
           at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)
           at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
           at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
           at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
           at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1452)
           at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
           at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626)
           at org.apache.nifi.web.filter.RequestLogger.doFilter(RequestLogger.java:66)
           at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
           at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
           at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
           at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
           at org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:61)
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
           at org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:61)
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
           at org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:61)
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
           at org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:61)
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
           at org.apache.nifi.web.security.NiFiAuthenticationFilter.authenticate(NiFiAuthenticationFilter.java:100)
           at org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:59)
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
           at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)
           at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
           at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
           at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
           at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
           at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
           at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
           at org.apache.nifi.web.filter.TimerFilter.doFilter(TimerFilter.java:51)
           at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
           at org.apache.nifi.web.filter.ExceptionFilter.doFilter(ExceptionFilter.java:46)
           at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
           at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
           at org.eclipse.jetty.servlets.DoSFilter.doFilterChain(DoSFilter.java:487)
           at org.eclipse.jetty.servlets.DoSFilter.doFilter(DoSFilter.java:336)
           at org.eclipse.jetty.servlets.DoSFilter.doFilter(DoSFilter.java:301)
           at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
           at org.apache.nifi.web.security.headers.StrictTransportSecurityFilter.doFilter(StrictTransportSecurityFilter.java:48)
           at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
           at org.apache.nifi.web.security.headers.XContentTypeOptionsFilter.doFilter(XContentTypeOptionsFilter.java:48)
           at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
           at org.apache.nifi.web.security.headers.XSSProtectionFilter.doFilter(XSSProtectionFilter.java:48)
           at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
           at org.apache.nifi.web.security.headers.ContentSecurityPolicyFilter.doFilter(ContentSecurityPolicyFilter.java:47)
           at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
           at org.apache.nifi.web.security.headers.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:48)
           at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
           at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
           at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
           at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
           at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
           at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
           at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
           at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
           at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
           at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
           at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
           at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
           at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
           at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
           at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
           at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
           at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:766)
           at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
           at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
           at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
           at org.eclipse.jetty.server.Server.handle(Server.java:516)
           at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
           at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
           at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
           at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
           at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
           at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
           at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:540)
           at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:395)
           at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
           at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
           at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
           at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
           at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
           at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
           at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
           at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
           at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
           at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
           at java.lang.Thread.run(Thread.java:748)
   Caused by: org.apache.nifi.processor.exception.ProcessException: Interrupted while waiting for site-to-site request to be serviced
           at org.apache.nifi.remote.StandardPublicPort.receiveFlowFiles(StandardPublicPort.java:561)
           ... 123 common frames omitted
   Caused by: java.lang.InterruptedException: null
           at java.lang.Object.wait(Native Method)
           at java.lang.Object.wait(Object.java:460)
           at java.util.concurrent.TimeUnit.timedWait(TimeUnit.java:348)
           at org.apache.nifi.remote.StandardPublicPort$FlowFileRequest.waitForService(StandardPublicPort.java:490)
           at org.apache.nifi.remote.StandardPublicPort.receiveFlowFiles(StandardPublicPort.java:552)
           ... 123 common frames omitted
   
   ```
   


----------------------------------------------------------------
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