Skip to content

Trigger refusing the sync of deployed azure function (WSGI) #80

Closed
@jakemckenzie

Description

@jakemckenzie

I made an azure function that uses the WSGI support in azure functions. It's a simple python application that uses flask and chatterbot library to run a chatbot in the browser. The project runs fine locally but when I deploy it to Azure (runtime version 3.0.15149.0 running python 3.7.9 USGovVirginiaLinuxDynamicPlan) the triggers refuse to sync after following the instructions of the author.

I thought I had found a workaround but I was mistaken and was wondering if anyone could point me in the right direction.

Here is my function.json:

{
  "scriptFile": "__init__.py",  
  "bindings": [  
    {  
      "route": "/{*route}",
      "authLevel": "anonymous",
      "type": "httpTrigger",
      "direction": "in",
      "name": "req",
      "methods": [
        "get",
        "post"
      ]
    },
    {
      "type": "http",
      "direction": "out",
      "name": "$return"
    }
  ]
}

My route uses a wildcard catch-all per the author's instructions. Also, like the author, I made the routeprefix blank (to remove the "api" prefix). This is the output I end up getting at the end of my deployment

4:45:27 AM chatterbot: Number of duplicate files found 698
4:45:27 AM chatterbot: Number of inodes 14092
4:45:27 AM chatterbot: Number of files 12722
4:45:27 AM chatterbot: Number of fragments 1086
4:45:27 AM chatterbot: Number of symbolic links  0
4:45:27 AM chatterbot: Number of device nodes 0
4:45:27 AM chatterbot: Number of fifo nodes 0
4:45:27 AM chatterbot: Number of socket nodes 0
4:45:27 AM chatterbot: Number of directories 1370
4:45:28 AM chatterbot: Number of ids (unique uids + gids) 1
4:45:28 AM chatterbot: Number of uids 1
4:45:28 AM chatterbot: 	root (0)
4:45:28 AM chatterbot: Number of gids 1
4:45:28 AM chatterbot: 	root (0)
4:45:28 AM chatterbot: Uploading built content /home/site/artifacts/functionappartifact.squashfs for linux consumption function app...
4:45:31 AM chatterbot: Resetting all workers for [removed url]
4:45:47 AM chatterbot: Syncing triggers...
4:46:06 AM chatterbot: Syncing triggers (Attempt 2/6)...
4:46:17 AM chatterbot: Syncing triggers (Attempt 3/6)...
4:46:39 AM chatterbot: Syncing triggers (Attempt 4/6)...
4:47:19 AM chatterbot: Syncing triggers (Attempt 5/6)...
4:48:57 AM chatterbot: Syncing triggers (Attempt 6/6)...
4:48:59 AM: Error: Encountered an error (InternalServerError) from host runtime.

It attempts to sync the triggers a few times and fails. I'm not sure if this is an issue specific to the Linux deployment of USGov or if the route wildcard required to get this WSGI functionality is not supported but if anyone had any pointers I would appreciate it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions