mirror of
https://github.com/openfaas/faas.git
synced 2025-06-14 11:16:47 +00:00
Update troubleshooting.md
This commit is contained in:
parent
0ed21a7db4
commit
97cabbf0c0
@ -17,16 +17,18 @@ Checklist:
|
||||
$ docker service ls
|
||||
```
|
||||
|
||||
You are looking for 1/1 for the replica count of each service listed.
|
||||
|
||||
### Find a function's logs
|
||||
|
||||
```
|
||||
$ docker service logs --tail 100 <function>
|
||||
$ docker service logs --tail 100 FUNCTION
|
||||
```
|
||||
|
||||
### Find out if a function failed to start
|
||||
|
||||
```
|
||||
$ docker service ps --no-trunc=true <function>
|
||||
$ docker service ps --no-trunc=true FUNCTION
|
||||
```
|
||||
|
||||
### Stop and remove OpenFaaS
|
||||
@ -38,7 +40,7 @@ $ docker stack rm func
|
||||
If you have additional services / functions remove the remaining ones like this:
|
||||
|
||||
```
|
||||
$ docker service ls -q|xargs docker service rm
|
||||
$ docker service ls -q | xargs docker service rm
|
||||
```
|
||||
|
||||
*Use with caution*
|
||||
@ -54,13 +56,13 @@ $ kubectl get deploy
|
||||
### Find a function's logs
|
||||
|
||||
```
|
||||
$ kubectl logs deploy/<function>
|
||||
$ kubectl logs deploy/FUNCTION
|
||||
```
|
||||
|
||||
### Find out if a function failed to start
|
||||
|
||||
```
|
||||
$ kubectl describe deploy/<function>
|
||||
$ kubectl describe deploy/FUNCTION
|
||||
```
|
||||
|
||||
### Remove the OpenFaaS deployment
|
||||
@ -69,6 +71,12 @@ $ kubectl describe deploy/<function>
|
||||
$ kubectl delete -f faas.yml,monitoring.yml,rbac.yml
|
||||
```
|
||||
|
||||
If you're using the async stack remove it this way:
|
||||
|
||||
```
|
||||
$ kubectl delete -f faas.async.yml,monitoring.yml,rbac.yml,nats.yml
|
||||
```
|
||||
|
||||
## Timeouts
|
||||
|
||||
Default timeouts are configured at the HTTP level for the gateway and watchdog. You can also enforce a hard-timeout for your function.
|
||||
@ -83,7 +91,7 @@ For the gateway set the following environmental variables:
|
||||
|
||||
### Debug your function without deploying it
|
||||
|
||||
Here's an example of how you can deploy a function without using an orchestrator - it's useful for testing:
|
||||
Here's an example of how you can deploy a function without using an orchestrator and the API gateeway. It is especially useful for testing:
|
||||
|
||||
```
|
||||
$ docker run --name debug-alpine \
|
||||
|
Loading…
x
Reference in New Issue
Block a user