Comments (6)
@bbpennel Thanks for reporting! I will look into it soon.
from matomo-java-tracker.
I am wondering if it could be related to a combination of the fact we are creating new MatomoTrackers for every request, and this block where it looks like a new FixedThreadPool gets initialized for each tracker but doesn't appear to get shut down?
https://github.com/matomo-org/matomo-java-tracker/blob/main/java11/src/main/java/org/matomo/java/tracking/Java11SenderProvider.java#L25
It seems like we should probably reuse a single instance of MatomoTracker
from matomo-java-tracker.
I was able to replicate the issue on our test server after about 16k requests. I switched over to initializing a single MatomoTracker and haven't seen the issue recur after about 64k requests. So our usage was the main issue, but it might still be a good idea to add a method for shutting down the executor for cases where clients use multiple MatomoTrackers.
from matomo-java-tracker.
I am wondering if it could be related to a combination of the fact we are creating new MatomoTrackers for every request, and this block where it looks like a new FixedThreadPool gets initialized for each tracker but doesn't appear to get shut down? https://github.com/matomo-org/matomo-java-tracker/blob/main/java11/src/main/java/org/matomo/java/tracking/Java11SenderProvider.java#L25
It seems like we should probably reuse a single instance of MatomoTracker
Yeah, I think that's the reason for it. MatomoTracker should be reused.
from matomo-java-tracker.
I was able to replicate the issue on our test server after about 16k requests. I switched over to initializing a single MatomoTracker and haven't seen the issue recur after about 64k requests. So our usage was the main issue, but it might still be a good idea to add a method for shutting down the executor for cases where clients use multiple MatomoTrackers.
Thanks so much! I will look how I can improve that.
from matomo-java-tracker.
@bbpennel The MatomoTracker class now implements AutoClosable to ensure, that the users close it after usage. This is blocking and will shutdown the threads used by async requests and frees the memory. Thanks for making Matomo Java Tracker better!
from matomo-java-tracker.
Related Issues (20)
- Add support for new Crash Analytics feature HOT 5
- Search Query must be set before Search Category HOT 2
- Use GitHub Actions for building
- Repair Javadocs
- Perform releases with GitHub Actions
- Add convenience methods to track typical scenarios
- Enhance Matomo Integration to Read Remote User Attribute
- Automatic Setting of `goalId` to 0 in Presence of Ecommerce Parameters
- Update Matomo Java Tracker for Singular Parameters
- Enforce limit of five custom variables with at most 100 characters per Matomo request HOT 1
- Update Versions in README.md during Release Workflow
- Bulk Collection and Sending of Tracking Requests HOT 3
- [REQUEST] pom.xml of releases should contain correct version numer HOT 1
- Ignore SSL Validation HOT 3
- Support callback in async send methods HOT 4
- Handling android-app referrer urls
- Vulnerable for Log4Shell through dependency log4j-core-2.11.0 (CVSS 10.0 and 9.0) HOT 2
- Event Appearing as Custom Variable in Matomo Dashboar HOT 2
- Complete rewrite HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matomo-java-tracker.