Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save data in temporary file instead of memory #106

Merged
merged 8 commits into from
Jun 21, 2016
Merged

Conversation

fippo
Copy link
Owner

@fippo fippo commented Jun 17, 2016

since snoop crashes with OOM ~150 times a day for me right now I am writing things to disk for now.

@fippo fippo force-pushed the tempfile branch 5 times, most recently from 7331f4e to aca9781 Compare June 17, 2016 21:06
@fippo fippo changed the title save data in temporary file instead of memory [wip] save data in temporary file instead of memory Jun 17, 2016
@fippo fippo force-pushed the tempfile branch 2 times, most recently from def669c to 539bb13 Compare June 17, 2016 21:16
@fippo
Copy link
Owner Author

fippo commented Jun 17, 2016

deployed, seems to survive longer now... :trollface:

@fippo fippo force-pushed the tempfile branch 2 times, most recently from 9824499 to 003493d Compare June 18, 2016 05:29
since snoop crashes with OOM ~150 times a day for me right
I am writing things to disk for now.
@fippo
Copy link
Owner Author

fippo commented Jun 21, 2016

after deleting stale data snoop-server just survived for at least nine hours without dying. This looks good..

@fippo fippo changed the title [wip] save data in temporary file instead of memory save data in temporary file instead of memory Jun 21, 2016
generateFeatures(referer, client, clientid);
delete db[referer][clientid];
tempStream.on('finish', function() {
fs.readFile(tempStream.path, {encoding: 'utf-8'}, function(err, data) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point I think we will have to put this reading/processing part in a different process reading the collected files in background and extracting features.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah. I noticed that feature generation can take quite long which skews serverside timestamps.
I'm considering doing the accept in the cluster-master and the feature generation in a couple of workers. Also splitting up the big feature loop such that each feature is a setTimeout.

@ggarber
Copy link
Collaborator

ggarber commented Jun 21, 2016

LGTM.

Not sure if it is worth starting to use EC2 instances with SSD disk (not sure which ones have it now). Just an idea.

@fippo
Copy link
Owner Author

fippo commented Jun 21, 2016

yeah, I am currently running into disk-full issues with writing this to the root disk ;-)

@fippo fippo merged commit 3311ab5 into fippo:develop Jun 21, 2016
@fippo fippo deleted the tempfile branch June 21, 2016 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants