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

Getting corrupted zip files for twitter filter after stopping the filter #360

Open
rajatvij opened this issue Sep 10, 2015 · 2 comments
Open

Comments

@rajatvij
Copy link
Contributor

I am getting corrupt zip files for twitter filters after stopping the filter.

Steps to reproduce:

  1. Create and save a new active filter in SFM admin.
  2. De-activate the filter.
  3. Run python manage.py organizedata
  4. Go to the directory where zip file is stored and run gunzip -c <filename.gz>

We can see an unexpected end of file.

NOTE: I used docker to create filter.

@justinlittman justinlittman changed the title Getting corrupted zip files for twitter filter after stoping the filter Getting corrupted zip files for twitter filter after stopping the filter Sep 10, 2015
@kerchner
Copy link
Member

@rajatvij, is this occurring in a non-docker environment?

@edsu
Copy link
Contributor

edsu commented Sep 10, 2015

I suspect that Supervisor is sending a signal to the filterstream process to shut it down, and it's not being handled long enough to close and flush the gzip file that is being written to, leaving it in a corrupted state. One thing you might want to try is adding a close method to sfm.ui.models.RotatingFile and then handling the interrupt signal (SIGINT, SIGTERM, I'm not sure which) when streaming the filter in sfm.ui.management.commands.filterstream so that you can call it before exiting.

@kerchner kerchner removed their assignment Sep 10, 2015
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

No branches or pull requests

3 participants