Search code examples
pythonibm-cloud

IBM Cloud functions - Unable to create an action


I'm unable to create an IBM Cloud action. I have no idea why.

My IBM data that I get in console is as follows:

API endpoint:      https://api.eu-gb.bluemix.net
Region:            eu-gb
User:              [email protected]
Account:           My Name's Account (12fcae9b137946b8bbfe481448612345)
Resource group:    Default
CF API endpoint:   https://api.eu-gb.bluemix.net (API version: 2.92.0)
Org:               my-org
Space:             dev

That look fine to me.

When I execute the test action as the docs says here as follows:

ibmcloud wsk action invoke whisk.system/utils/echo -p message hello --result

I get correct result:

{
    "message": "hello"
}

But I'm not able to create my own actions.

The folder looks as follows:

Thus there is .zip file

Thus there is .zip file that I created with

zip -r as24-crawler.zip virtualenv commmon.py __main__.py

And now when I try to create an action as the docs says here with

ibmcloud wsk action create my-action-name --kind python:3 as24-crawler.zip

I got an error as follows:

error: Unable to create action 'my-action-name': The connection failed, or timed out. (HTTP status code 413)

Any idea what am I doing wrong?

UPDATE

Is the file size to big? I'm not sure. The error message is not clear but the meaning could be that the file to big is.

They say in the docs that the limit is 48MB. But my created .zip file is 43.6MB. Thus I assume that that not the problem is. enter image description here


Solution

  • I am one of the guys responsible for IBM Cloud Functions. We have been looking into this issue and must admit that this is a bug (causing zip files to be rejected even if the are smaller than the documented 48MB limit); we are already working on a fix to get this resolved asap.

    In the meantime you may want to have a look at the workaround (which allows you to "outsource" some of your dependencies etc.) described here: http://jamesthom.as/blog/2017/08/04/large-applications-on-openwhisk/

    I hope this helps - feel free to contact me (e.g. via Linkedin/Twitter, see my profile information) directly in case you have further questions or in case you want to discuss anything else.

    Thanks for having found and reported this issue and sorry for inconvenience.