Comments (9)
Gonna close this since you found a solution. Thanks
from telescope.
Thank you for reporting this issue!
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Thank you!
from telescope.
for ($i = 0; $i < 5000; $i++) {
Telescope::recordJob(new IncomingEntry(['hi' => str_repeat('a', 100000)], Str::uuid()));
}
Given this fails, I think this is more a problem with the fact telescope will store unlimited amounts of entries before running store. In my case, I often have to queue 20k jobs in local development. The job dispatching often runs out of memory around 10k jobs.
Would a max queue length make sense for telescope?
from telescope.
I have solved it myself via :
Telescope::$afterRecordingHook = function () {
if (count(Telescope::$entriesQueue) > 1000) {
Telescope::store(app(EntriesRepository::class));
}
};
It does seem like a bit of a footgun that wouldn't hurt to have some rails on it. Don't mind writing the pull request if you want a max queue size variable.
from telescope.
This should be implemented by a config @nick-potts
from telescope.
What solution? Disable job watcher?
C'mon...
from telescope.
I don't think the above scenario is a realistic one for a real-world application sorry. Dispatching 5000 jobs in a row most likely is better refactored to a different way where you can spread out the dispatching over multiple requests. We're still open to PR's to improve this.
from telescope.
We dispatch way less jobs and our app still goes OOM when telescope is attached.
I don't think this issue should have been closed since it's a massive headache. And if you google it a you will see how many people struggle with it.
I don't see why should we change how many jobs one command (not request) creates
from telescope.
Another, more real-world, scenario where php can crash due to running out of memory is the query watcher.
If you run many queries in the same request/job, it'll never flush and can run through the available memory quite quickly.
I can potentially write a PR, just not sure how best to implement it.
from telescope.
Related Issues (20)
- Changing table names in database HOT 1
- Redirect Back to Application Dashboard/Homepage HOT 1
- [Feature Request] Set timezone for IncomingEntry recorded_at HOT 1
- Call to undefined method Laravel\Telescope\Telescope::ignoreMigrations() HOT 1
- Migration file is being published with a new timestamp everytime HOT 2
- Also add a given response in the app
- User vistor's count like page wise display HOT 1
- When saving a model I use several primary_keys HOT 2
- Allowed memory size exhausted HOT 1
- Ability to set queue for ProcessPendingUpdates HOT 2
- Allow setting a dedicated cache store HOT 1
- Manifest.json cause 404 error if file in resources is missing HOT 2
- Add crossorigin anonymus to the mix configuration because it's not possible to use with a CDN for all the resources HOT 6
- Avatars are not being displayed in request details HOT 4
- 5.0.3 upgrade app.js SHA-384 integrity issue HOT 1
- Use configurable database table names HOT 1
- Preventing migrations from running in Production HOT 2
- Request for Enhancement: Adding Direct Link to Code Editor Feature in Laravel Telescope HOT 1
- Telescope Jobs watcher causes queued job exception HOT 6
- SVG icons not loading HOT 1
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 telescope.