Closed bikerp closed 5 years ago
probably the parsing of the files takes too much time.... try to run it with DEBUG=domain* to see what takes so much time... btw: this module was never built to use for an "on-request" execution...
Thanks for the response. It seems that the eventstore initialization takes most of the time. Could you please explain meaning of individual fields of events table (DynamoDB) in eventstore? I have some idea but I'd like to be sure. Thanks
Perhaps @developmentalmadness can help?
Haven't looked at this for 2.5 years now so I don't remember the mechanics. But we used this in Lambda exclusively on the project I was working on at the time. I haven't followed progress, so I don't know if anything has changed to affect it's ability to run in that environment since.
As for the slow initialization time you may want to look at the ReadCapacityUnits
and WriteCapacityUnits
. In the module the defaults are not set to production values for cost reasons. Having them set so low also achieves two other goals: forcing you to think about what they should be before going to prod instead of getting caught by the defaults; and running the tests verifies that the retry logic around throttling is working. You'll need to configure those in your startup to reflect the capacity requirements for your project.
One other reason could be the first time you initialize the module it will create the table in DynamoDB for you. When it does it waits until the table becomes active. This process likely takes some time as well.
Thanks for the answers
Hi, I'd like to use your project in AWS environment using Lambda. I have already tried but it seems that initialization takes too long (approx. 2 seconds). Any idea what part of the code could be ommited in AWS? Thanks Pavel