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

Logs not appearing in Loggly if log size is > 4MB #24

Open
duxthefux opened this issue Aug 11, 2016 · 2 comments
Open

Logs not appearing in Loggly if log size is > 4MB #24

duxthefux opened this issue Aug 11, 2016 · 2 comments

Comments

@duxthefux
Copy link

Hey,

I'm trying to get everything working since a couple of hours and I just figured out it's not working because of the log size (around 4MB).

If I test it with a smaller log file it's easily pushing to Loggly.

Do have know a workaround? Maybe trying to avoid to send the whole logs at once?

Thanks!

@cboscolo
Copy link
Owner

@duxthefux, sorry that you ran into this. Is there anything in the CloudWatch logs that indicate exactly why it is failing?

As a quick fix, have you tried increasing the MemorySize and Timeout configuration of your lambda function? (What values do you currently have them set to?)

Regarding changes to the code: The current version downloads the entire S3 object before processing and uploading the results to S3. The processing-and-upload side uses a bufferStream, so I think the code could be modified to make the call to s3.getObject() be the head of the stream.

I think you could just remove the download function from the async pipeline and replace bufferStream at line 309 with:
s3.getObject({ Bucket: bucket, Key: key}).createReadStream()

This would only help if Lambda timeouts or memory size is the reason for it failing.

@duxthefux
Copy link
Author

Hey, I don't think the problems are caused by MemorySize or Timeout because Timeout is already set to 4m50 and MemorySize to the maximum.
Moreover I get nice logs from CloudWatch:
http://pastebin.com/jFyNrJ43
(It's only parsing 5000 events because I added a limit because I thought the problem is caused by loggly's 5MB bulk limit)...in the very beginning it worked a few times but not any longer...it's pretty weird...:-/

thanks!

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

2 participants