Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The lost async servlets #20

Closed
zloster opened this issue Apr 5, 2017 · 7 comments
Closed

The lost async servlets #20

zloster opened this issue Apr 5, 2017 · 7 comments
Assignees
Milestone

Comments

@zloster
Copy link
Owner

zloster commented Apr 5, 2017

Work toward their restoration. See issue 2598 in the upstream repository.

@zloster zloster added this to the BetterTimes milestone Apr 5, 2017
@zloster zloster self-assigned this Jan 18, 2018
@zloster zloster added the пече се Работи се по това label Jan 18, 2018
@zloster zloster modified the milestones: Better Times, Round 15 Jan 18, 2018
@zloster
Copy link
Owner Author

zloster commented Feb 7, 2018

Resin 4.0.55 doesn't support Servlet 3.1. Servlet 3.1 has the async IO support. We will need Apache Tomcat sooner.

@zloster
Copy link
Owner Author

zloster commented Feb 7, 2018

OK. Tomcat 9.0.4 installation is working. Got some benchmark data. Now trying to build APR tomcat-native adapter for faster native I/O. It requires OpenSSL 1.0.2 but Ubuntu 14.04 comes with 1.0.1x.

@zloster
Copy link
Owner Author

zloster commented Feb 7, 2018

There are three components here: APR, OpenSSL 1.0.2 and Tomcat native bindings to ARP. They should be build together. Currently I get warnings in Tomcat log file (catalina.out) when trying to load the ARP library.

@zloster
Copy link
Owner Author

zloster commented Feb 7, 2018

Managed to make Tomcat 9 to use ARP and OpenSSL 1.0.2.

07-Feb-2018 19:57:05.116 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.16] using APR version [1.5.1].
07-Feb-2018 19:57:05.117 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
07-Feb-2018 19:57:05.119 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]

Played also with the various connector implementations and some tweaks: NIO2 seems the best. But it is loosing against Resin 4.0.53. JSON test heaviest: 4400 rps vs 3550 rps. But Resin already shows saturation - the RPS is falling with the heavier load.

@zloster
Copy link
Owner Author

zloster commented Feb 8, 2018

The shell scripts with Tomcat 9.0.4, OpenSSL 1.0.2, Apache APR 1.6.3, Tomcat Native connector compilation, installation and so on are ready.
Also basic setup of server.xml with NIO2 connector.

@zloster zloster modified the milestones: Round 15, Round 16 Feb 17, 2018
@zloster zloster removed the пече се Работи се по това label Feb 22, 2018
@zloster
Copy link
Owner Author

zloster commented Feb 22, 2018

Pull request submitted: 3319.

@zloster zloster closed this as completed Feb 22, 2018
zloster pushed a commit that referenced this issue Oct 2, 2018
Here's an example of the error output from before this change:

Unhandled exception:
Bad state: Stream was already listened to
#0      _RawServerSocket.listen (dart:io-patch/socket_patch.dart:1106)
#1      new _ForwardingStreamSubscription (dart:async/stream_pipe.dart:123)
#2      _ForwardingStream._createSubscription (dart:async/stream_pipe.dart:91)
#3      _ForwardingStream.listen (dart:async/stream_pipe.dart:86)
#4      _ServerSocket.listen (dart:io-patch/socket_patch.dart:1351)
#5      _HttpServer.listen (dart:io/http_impl.dart:2278)
#6      _startServer.<anonymous closure> (file:///server.dart:88:12)
#7      _RootZone.runUnary (dart:async/zone.dart:1371)
#8      _FutureListener.handleValue (dart:async/future_impl.dart:129)
#9      _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:636)
#10     _Future._propagateToListeners (dart:async/future_impl.dart:665)
#11     _Future._completeWithValue (dart:async/future_impl.dart:478)
#12     Future.wait.<anonymous closure> (dart:async/future.dart:362)
#13     _RootZone.runUnary (dart:async/zone.dart:1371)
#14     _FutureListener.handleValue (dart:async/future_impl.dart:129)
#15     _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:636)
#16     _Future._propagateToListeners (dart:async/future_impl.dart:665)
#17     _Future._completeWithValue (dart:async/future_impl.dart:478)
#18     Future.wait.<anonymous closure> (dart:async/future.dart:362)
#19     _RootZone.runUnary (dart:async/zone.dart:1371)
#20     _FutureListener.handleValue (dart:async/future_impl.dart:129)
#21     _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:636)
#22     _Future._propagateToListeners (dart:async/future_impl.dart:665)
#23     _Future._completeWithValue (dart:async/future_impl.dart:478)
#24     _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:510)
#25     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#26     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#27     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:99)
#28     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:152)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant