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

ESWarmer lambda is generating a big ammount of log data in CloudWatch #692

Closed
6 tasks
jeve7 opened this issue Feb 16, 2024 · 5 comments
Closed
6 tasks

ESWarmer lambda is generating a big ammount of log data in CloudWatch #692

jeve7 opened this issue Feb 16, 2024 · 5 comments
Assignees
Labels

Comments

@jeve7
Copy link

jeve7 commented Feb 16, 2024

Describe the bug
I have a bot configured in my DEV account with aprox 220 questions since 8 days ago. There's a log group in CloudWatch associated with the "ESWarmer" lambda showing "Stored bytes" as 19.65 GB. Almost 20 GB per week in a DEV environment is unusual. When I checked out the log I saw a JSON structure that includes the wording of the questions (Using an attribute "q") and some other elements like one called "q_vector" and "a_vector" that are a very long list of numbers.
This huge amount of info is growing at a high rate since this function is called every minute.

To Reproduce
Deploy a QnA Bot and populate some questions.
Do a few queries using any client to get things started.
Check the log group associated with the "ESWarmer" lambda and see the data growing every minute.

Expected behavior
Since this seems to be a function to maintain something "warm" I'd expect low process and minimum login in the file. It shouldn't grow that fast in a non-productive system.

Please complete the following information about the solution:

  • Version: 5.5
  • Region: ca-central-1
  • Was the solution modified from the version published on this repository? NO
  • If the answer to the previous question was yes, are the changes available on GitHub? N/A
  • Have you checked your service quotas for the services this solution uses? N/A
  • Were there any errors in the CloudWatch Logs? NO

Screenshots
CloudWatch log group showing almost 20Gb in 8 days

ESWarmerLog-01

Screenshot of how info looks like in the log

ESWarmerLog-02

@jeve7 jeve7 added the bug label Feb 16, 2024
@dougtoppin
Copy link

@jeve7 Thanks for your report. We will investigate and get back to you.

@fhoueto-amz fhoueto-amz assigned abhirpat and unassigned abhirpat Feb 19, 2024
@dougtoppin
Copy link

@jeve7 We have been trying to duplicate what you are seeing but have not been able to so far.

When you created the stacks, did you change any of the default settings on the Admin page (such as enable any debugging or change any other default value)?

Have you used the same set of questions before and, if so, not had this problem with this set?

@jeve7
Copy link
Author

jeve7 commented Feb 19, 2024

Hi @dougtoppin. I am not enabling anything out of the ordinary. This is a DEV instance so Opensearch is 1 node unencrypted and the minimum Sagemaker available was 1 (I opened other issue with serverless not working). I am attaching a file with the details in case you wanted to see all of them. No debug or anything like that (BTW I don't see a DEBUG option in the stack parameters).
In the admin page "ENABLE_DEBUG_RESPONSES" and "ENABLE_DEBUG_LOGGING" are set to false (Default). I am importing a settings file that sets a few values including a "Lambda postprocess hook", I am attaching that as well.
I was checking the logs and I found the start of the long message. I took a screenshot to show you where is this coming from. I was looking at the message (it's huge!) and it includes all the different "Question/Utterance" followed by the vector which is a big amount of numbers. The format is [{"q":"Question/Utterance","q_vector":[123213123,2131231,1231231,....]

In the screenshot you can see the "main" word added by this line of code 3 lines above:
#

qnabot.log(`main ${i}`);

ESWarmerLog-03
QnABotSettings-EN.json
StackParameters.txt

@abhirpat
Copy link
Member

abhirpat commented Feb 19, 2024

Thank you, @jeve7. We will be making this fix available in upcoming release of QnaBot on AWS. We will update this thread once release is out.

@bios6
Copy link
Member

bios6 commented Apr 1, 2024

Hi @jeve7, we have released 5.5.1 which has the fix for the issue. Thank You!

@bios6 bios6 closed this as completed Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants