Closed j0hnsmith closed 6 years ago
Interesting one... how much RAM and how many CPUs does your engine have?
Can you try stopping and restarting the box too?
It's running on GKE, no specific resource limits in the namespace (cpu: 100m
in the global namespace). I tried adding some specific limits, when they are too low there's an error message command exited during start up
.
It's working now so the restart 'fixed' it, if I see it again I'll shout here.
Hmm.. strange one. Yes, please keep us informed.
I can reproduce it pretty consistently with this kubernetes config, perhaps a race condition that shows itself when the box is starved of cpu? When I change the cpu limit to 500m
it doesn't seem to happen.
---
apiVersion: v1
kind: Service
metadata:
name: textbox
namespace: machinebox
labels:
name: textbox
spec:
ports:
- name: http
port: 8080
selector:
app: textbox
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: textbox
namespace: machinebox
spec:
replicas: 1
revisionHistoryLimit: 3
template:
metadata:
labels:
app: textbox
spec:
containers:
- name: textbox
image: machinebox/textbox:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
name: http
resources:
limits:
cpu: "200m"
memory: 2Gi
requests:
cpu: "100m"
memory: 512Mi
env:
- name: MB_KEY
valueFrom:
secretKeyRef:
name: machinebox
key: key
- name: MB_TEXTBOX_DISABLE_SENTIMENT
value: "true"
hmm, ignore above, is happening with 500m
too. Seems to be random, sometimes it starts and returns some responses, then locks after a few minutes.
@dahernan Let's take a look at this later today.
Hi, usually when textbox is struggling is related with memory and not with CPU, please try to give more memory, probably around 3GB for just MB_WORKERS=1 and 1GB more per extra worker.
Are the request very big? for example are you processing a big document? In that case if you don't have enough memory try it to break it, in more request
Requests were tiny, eg example text
.
Haven't had any problems for a few days after setting 3GB memory. Maybe warning at startup if memory is less than say 2GB would help, at least the problem would be less silent.
ohh cool, thanks!
I will have a look to memory consumption
/textbox/check
isn't responding. I'm running textbox ok as I can load the web interface, here's a screenshot of the demo.Log not showing anything
The connection is accepted but hangs