I just want to apologise to this community. I recently made a post where I claimed laravel was unreliable for enterprise.
It turns out it was me, not laravel.
I spent days going through server logs, checking configs, checking environment settings, checking php and laravel logs, doing extensive tests.
I found out that some of the data was "dissapearing" because:
1. the api throttling was turned on
2. the api request validation sometimes failed because of user input. as in, people entered decimals and the validation was expecting an whole integer.
This is why I couldn't find anything in the logs. It turns out that no actual error needed to be logged because I am a fucking idiot.
28 thoughts on “Wrong about laravel being unreliable”
I had a suspicion that it might have been throttling, but I didn’t get a chance to post it (and figured it would show up in the logs).
I’m glad you got it sorted! Moving forward, will you be adding logging to catch these sort of issues?
Isn’t programming fun?
> the api throttling was turned on
I do kind of wish throttling wasn’t on be default. Let me set limits like this if I need them vs enabled with a rather arbitrary default…
(But good front end logging should catch the API call failures.)
It takes guts to admit it. Good for you.
Might I suggest automated tests in future?
My dude, I want to thank you for posting this. Not only is it uncommon and commendable these days for someone to admit to being wrong, this post could lead people having similar problems to your first post to the solution. Well done!
Good for you owning up to your mistake, I respect that.
This is a sign of maturity. Good for you to be able to accept your mistakes. As a developer, these things can only be solved through experience. Good luck with your journey.
As they say, the computer is never wrong, the monkey sitting behind it is.
I stand by what i said earlier, you’re an incompetent dev
Good on ya fella
Thanks for the update.
This is what I call the middle level ego. As junior you’re kind of like, “all of this stuff is amazing, I want to know more”. Then you learn a lot and think “I can do all of this now, I know all the tools” but when something goes wrong it’s like “I can do all of these things, I don’t need X thing holding me back”.
Eventually you hopefully humble and realise you were good at playing with tools and you eventually start to make your own and realise how hard it is to make good tools that satisfy real requirements, how you have to make decisions about trade offs. Then you’re at a senior level.
Seek and you shall find. In the configs. Always assume its your fault until its not but of course its gonna be hard to tell eitherway.
Good on you for posting this.
It’s like I was telling a friend the other day: My code does exactly what I tell it to. Sometimes that leads to a misunderstanding between me and the computer.
Thanks for posting this. I’m currently writing an app with external api, and you probably saved me from the same headaches.
I’m glad you had the gut to publicly admit your mistake. Cheers mate
I am a fucking idiot.
I tell this to myself on the daily.
Happens all the time, great on ya for beeing honest!
Aren’t we all?
I mean, it could be worse. You could just say that “Laravel sucks” and come up with no arguments even for it (my outsource client).
Admitting your mistake… you sure you belong on reddit 🙂
That is awesome!
I too have fallen for the throttling and in a first time product rollout.
This was probably 5.2 or so. And in my case it wasn’t the API throttling but with rate limiting.
Unit tests – pass.
Simulated stress test – pass.
Live action group participation showing the product to a group of 200 in the same room on the same connection / IP and face plant.
Been there. Good that you can admit it.
Big props for posting this. Thank you!
Good on you to admit this. Would love to hear how you discovered/diagnosed the problem if it wasn’t showing up in logs…. Reading after action reports is kind of my favorite!
That’s great to hear. Thank you very much for updating us!
If you’re wanting to push the server even further, there’s also swoole, though it can cause headaches with db pooling, and sessions if not setup correctly.
Alternately think out of the box when dealing with slow api requests. Maybe use go or rust for a few endpoints. Also learn to use explain to diagnose queries. Eloquent is great but some queries are better done using raw sql.
Laravel isn’t the most performant, but it’s full of bells and whistles that make building solutions easier and faster. For reddit and Facebook scale apps you’re gonna hit headaches scaling but even most enterprise apps serve a lot less users, and with good devops you can scale out to multiple servers, load balancers, etc.