Everyday Software Design Patterns

{
"development": {
"username": "myusername",
"password": myuserpassword,
"database": "mydatabase",
"host": "127.0.0.1",
"dialect": "postgres"
}
}
{
"development": {
"username": "myusername",
"password": myuserpassword,
"database": "garbageDatabase", // changed the database name
"host": "127.0.0.1",
"dialect": "postgres"
}
}
Memory leak example
<--- Last few GCs --->17065 ms: Mark-sweep 1042.2 (1457.9) -> 1042.1 (1457.9) MB, 162.8 / 0 ms [allocation failure] [scavenge might not succeed].
17232 ms: Mark-sweep 1042.1 (1457.9) -> 1042.1 (1457.9) MB, 166.8 / 0 ms [allocation failure] [scavenge might not succeed].
17407 ms: Mark-sweep 1042.1 (1457.9) -> 1042.1 (1457.9) MB, 175.0 / 0 ms [last resort gc].
17587 ms: Mark-sweep 1042.1 (1457.9) -> 1042.1 (1457.9) MB, 180.5 / 0 ms [last resort gc].
<--- JS stacktrace --->==== JS stack trace =========================================Security context: 0x134324bb4629 <JS Object>
2: /* anonymous */(aka /* anonymous */) [/Users/abhinavdhasmana/Documents/Personal/sourcecode/memoryLeak/server.js:~13] [pc=0x571bd8907f4] (this=0x134324b041b9 <undefined>,request=0x32a5bb2fbbd1 <JS Object>,reply=0x32a5bb2fdd81 <JS Function reply (SharedFunctionInfo 0x271b1d0a7f39)>)
3: handler [/Users/abhinavdhasmana/Documents/Personal/sourcecode/memoryLeak/node_modules/hapi/lib/handle...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
[1] 46301 abort node server.js

--

--

--

Senior Staff Engineer @freshworks. Ex-McKinsey/Microsoft/Slideshare/SAP, Tech Enthusiast, Passionate about India. Opinions are mine

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhinav Dhasmana

Abhinav Dhasmana

Senior Staff Engineer @freshworks. Ex-McKinsey/Microsoft/Slideshare/SAP, Tech Enthusiast, Passionate about India. Opinions are mine

More from Medium

Escaping Tutorial Hell

Clean Code

Backend Development Key Technologies and Features

Tips For A Good Software Developer