apache or customer?

Running top -b -n 1 on cloud shows something confusing

My main app has spawned twice!

Once by user apache and once by customer. Is this Normal?

top - 23:28:26 up 35 min, 0 users, load average: 1.69, 1.75, 1.28
Tasks: 7 total, 1 running, 6 sleeping, 0 stopped, 0 zombie
Cpu(s): 40.2%us, 29.8%sy, 0.0%ni, 28.5%id, 1.1%wa, 0.0%hi, 0.0%si, 0.4%st
Mem: 501184k total, 453764k used, 47420k free, 5124k buffers
Swap: 523260k total, 5888k used, 517372k free, 139000k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 5097 customer 20 0 117m 76m 9.8m S 93.0 15.5 3:53.77 MAINapp 2074 apache 20 0 77464 30m 1456 S 0.0 6.3 0:00.13 MAINapp 5325 apache 20 0 51596 17m 5916 S 0.0 3.5 0:10.14 Load-Dev 5836 apache 20 0 33636 4676 1956 S 0.0 0.9 0:00.04 index.cgi 6059 apache 20 0 33636 4680 1956 S 0.0 0.9 0:00.03 index.cgi 6129 apache 20 0 33636 4664 1944 S 0.0 0.9 0:00.04 index.cgi 6131 apache 20 0 14892 1056 856 R 0.0 0.2 0:00.01 top

(Or is one the CGI and one the app?)

The index.cgi files are the CGI apps. You’ll have one of those for each request that your app is currently responding to.

You should not have two instances of your app running as two different users like that.

Looking at that top call, it looks like you’ve got an instance of your app running as customer which is using 117MB and consuming 93% of your CPU (and has been running for 3 minutes and 37.77 seconds)

Are you running top from within Mainapp?

It’s running in load-dev