Details
-
Aboutnetwork engineer focused in IoT development.
-
Skillspython, JavaScript, php, Java, redhat, IoTivity, node
-
LocationDenver
-
Github
Joined devRant on 12/9/2017
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
Anyone else have weird useless dreams?
Last night I dreamed that if my cat couldn't open my door, it was because her depencies weren't correctly installed.8 -
"I don’t think of myself as an artist. I know some designers consider themselves such, but I can’t. This is not to say that I don’t hope that our work has artistic merit. Anyway, I never know how someone could proclaim himself or herself to be an ‘artist’; I think it should be a designation best left for others to bestow, much like ‘genius’ and ‘asshole’." - Alexander Isley1
-
So I recently finished a rewrite of a website that processes donations for nonprofits. Once it was complete, I would migrate all the data from the old system to the new system. This involved iterating through every transaction in the database and making a cURL request to the new system's API. A rough calculation yielded 16 hours of migration time.
The first hour or two of the migration (where it was creating users) was fine, no issues. But once it got to the transaction part, the API server would start using more and more RAM. Eventually (30 minutes), it would start doing OOMs and the such. For a while, I just assumed the issue was a lack of RAM so I upgraded the server to 16 GB of RAM.
Running the script again, it would approach the 7 GiB mark and be maxing out all 8 CPUs. At this point, I assumed there was a memory leak somewhere and the garbage collector was doing it's best to free up anything it could find. I scanned my code time and time again, but there was no place I was storing any strong references to anything!
At this point, I just sort of gave up. Every 30 minutes, I would restart the server to fix the RAM and CPU issue. And all was fine. But then there was this one time where I tried to kill it, but I go the error: "fork failed: resource temporarily unavailable". Up until this point, I believed this was simply a lack of memory...but none of my SWAP was in use! And I had 4 GiB of cached stuff!
Now this made me really confused. So I did one search on the Internet and apparently this can be caused by many things: a lack of file descriptors or even too many threads. So I did some digging, and apparently my app was using over 31 thousands threads!!!!! WTF!
I did some more digging, and as it turns out, I never called close() on my network objects. Thus leaving ~30 new "worker" threads per iteration of the migration script. Thanks Java, if only finalize() was utilized properly.1 -
Someone went to HR complaining about never getting a lunch... We're told to work them out amongst ourselves and cover, but he's never once asked us to cover.
So now we HAVE to take lunch and we HAVE to make up that time by staying late or coming in early.
There are days when I'm on a roll and I don't WANT to stop to take lunch. It fucks with my rhythm and I end up breaking shit. We're all adults, why the fuck can't people act like it?8 -
I think im sick. Not because my whole body hurts, my nose is running and i cant even move, but because i just had the idea that i should unit test my personal project.4