coderofsalvation opened a new issue #5094:
URL: https://github.com/apache/openwhisk/issues/5094


   ## Environment details:
   
   * local deployment
   * docker 18.09.8-ce, alpine linux 3.10
   
   ## Steps to reproduce the issue:
   
   ```bash
   $ AUTH=$(docker exec openwhisk wsk property get --auth | awk '{ print $3 }' )
   $ wsk property set --auth $AUTH --apihost http://localhost:3233
   
   $ echo 'function main(args) {
           const name = args && args.name || "stranger";
           return { greeting: `Hello ${name}!` };
         }' > hello.js
   
   $ wsk action create helloJS hello.js --concurrency 10
   error: Unable to create action 'helloJS': The request content was malformed:
   requirement failed: concurrency 10 exceeds allowed threshold of 1 (code 
oUwMJCOQ4NCcatFSX49kTCwaFYtxhX7D)
   Run 'wsk --help' for usage.
   
   $ wsk action create helloJS hello.js
   ok: created action helloJS
   
   $ time curl -H 'Content-Type: application/json' -X POST -u "$AUTH" 
http://localhost:3233/api/v1/namespaces/guest/actions/helloJS?blocking=true
   
   $ time curl -H 'Content-Type: application/json' -X POST -u "$AUTH" 
http://localhost:3233/api/v1/namespaces/guest/actions/helloJS?blocking=true
   {....,"response":{"result":{"greeting":"Hello ${name}!"}...}
   real    0m1.031s
   user    0m0.005s
   sys     0m0.001s
   
   $ time curl -H 'Content-Type: application/json' -X POST -u "$AUTH" 
http://localhost:3233/api/v1/namespaces/guest/actions/helloJS?blocking=true
   {....,"response":{"result":{"greeting":"Hello ${name}!"}...}
   real    0m0.501s
   user    0m0.004s
   sys     0m0.001s
   
   ```
   
   ## Provide the expected results and outputs:
   
   I expected the second curl response-time to be much smaller/faster.
   
   ## Provide the actual results and outputs:
   
   * Why is concurrency limited 1 for to nodejs:10? Documentation states 
otherwise.
   * It seems that, the more time is in between the curl calls..the 
smaller/faster the responsetime is.
   
   Given a fair amount of activations, I would expect any recurring call to be 
superfast:
   
   ```
   $ wsk activation list | grep helloJS | grep warm | wc -l
   27
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to