Jump to content

two admins at once


bkessler91

Recommended Posts

Anyone experience two admins logged in at once, both modifying products?

 

Is this not recommended?

 

Welp, too late I already did it.  I was working on adding products, while an employee was updating inventory.  Ever since then, cubecart has been running slooooowww.

 

Any suggestions?  The CPU processes are running pretty high on my server... so when I log back into admin it takes forever.  Also, traffic and sales on my site are low, so I think customers are experiencing slow-ness as well.

 

Holy crap, help.

Link to comment
Share on other sites

CPU Usage - %1.99
MEM Usage - %0.22
Number of MySQL procs (average) - 0.07
Top Process %CPU 68.30 /shopping_cart/index.php
Top Process %CPU 59.60 /shopping_cart/admin.php
Top Process %CPU 20.00

 

I only have 2% shared CPU usage on this server, as you can see, I am maxed out.
Link to comment
Share on other sites

Ok, interesting.

 

So, I conclude that you do not have access to the list of actual processes running on your account -- a list that would show which exact process is burning up 1.9% of CPU power.

 

Can your hosting provider assist?

 

Does your hosting control panel offer to 'kill' (and auto-restart) processes?

Link to comment
Share on other sites

To answer your original question: I cannot conceive of how there would be a problem with more than one admin logged in.

 

Of course, there is the possibility of inadvertent database re-updates back to a pre-update: that is, admin#2 updates a database record with older data that admin#1 changed a few seconds ago. I see this simply as a conundrum on the part of admin#1 -- "Why did this revert back?" -- but not a serious problem.

 

I can see where an advisory on the "Admin is logged in" area also says "...and Ben, Charlie, and Dan are logged in". Similar in concept to the list of logged-in people shown at the bottom of the page of these forums.

 

Locking out a product, category, document, store settings, or etc, etc, etc, while in the Edit screen really has not been an issue based on conversations in these forums.

Link to comment
Share on other sites

 

Does your hosting control panel offer to 'kill' (and auto-restart) processes?

 

My host tech support responded "I suggest you wait for the process to finish and see if the site comes back to normal speed."

But, this could take awhile.   I do not have permission to end processes or restart them (at least I dont think so)  I am using cPanel X (Accelerated 2) 11.40

 

 

A shot in the dark.  What if I saved admin.php with no contents, then a few minutes later restore the file with the original contents.  Maybe that will trick it into stopping the process?  Again, just a shot in the dark.

 

Link to comment
Share on other sites

PHP has a time limit for executing a script. In case some code goes into an infinite loop, 30 seconds later (typical), PHP throws a system error and finishes.

 

Apache is also supposed to have a time limit.

 

(Then there is the database.)

 

But each can spawn more than one process. (Only in Windows...) I've seen processes get stuck -- "going nowhere mighty fast."

 

May I suggest you tell your host there is nothing on your site that should/could/would cause a process to last as long as it has.

Link to comment
Share on other sites

Hi

Are the server resources being maxed out related to times when you have multiple admin users logged in or are you struggling with this anyway even with one or none admin users ?

You can have multiple admin users logged in and working at the same time but if you do this at times when you have lots of front end users (particularly if you are struggling with server resources anyway) and especially if your admin users are doing the same tasks (ie updating inventory) then you are likely to run into MySQL database issues. CubeCart uses MYISAM tables which dont use record level locking but instead use table level locking so on a busy server this can often cause major issues.

---------A technical explanation of how MYISAM systems operate for those interested--------------------

MyISAM tables have a read queue and a write queue. Queries are placed into one of those two queues to be processed. The write queue has higher priority than the read queue, but the table can only process one write query at a time. Multiple read queries can occur at once, so the read queue will often be empty.

If a single query is added to the write queue, the read queue will block additional queries from starting. All existing read queries will continue to run until they’re finished, then any queries in the write queue will be processed. Then, and only then, the read queue will flush its queries.

This queue system works very well for short queries. As long as no queries run for a significant amount of time, things will generally perform well. A long-running write query will lock the table the entire time it’s running. Additionally, a long-running read query will do the same, if a write query (even a short one) is waiting for it.

------------------End of technical explanation !--------------------

MYISAM tables perform well on systems where there are a large percentage of Reads vs Writes to the database but perform badly on overloaded systems when trying to perform multiple writes on a few tables.

Thanks

Ian

Link to comment
Share on other sites

I think something else is going on here...  over the past 2 days the CPU usage has returned to normal.  Now today, I am updating inventory (just myself alone) and updating one product is taking very very long.

CPU Usage - %1.82
MEM Usage - %0.16
Number of MySQL procs (average) - 0.18
Top Process %CPU 42.00


Top Process %CPU 32.20 /shopping_cart/index.php
Top Process %CPU 30.00 /shopping_cart/index.php

Any recommendations?
 

I think something else is going on here...  over the past 2 days the CPU usage has returned to normal.  Now today, I am updating inventory (just myself alone) and updating one product is taking very very long.

CPU Usage - %1.82
MEM Usage - %0.16
Number of MySQL procs (average) - 0.18
Top Process %CPU 42.00 [php]
Top Process %CPU 32.20 /shopping_cart/index.php
Top Process %CPU 30.00 /shopping_cart/index.php

Any recommendations?
 

Note:  Searching for the product and loading the product (in admin) its normal speed.  When I change the qty and click save is when it is taking a long time.
 

Link to comment
Share on other sites

It is likely that your resource usage is simply maxed out and therefore you have processes waiting on other things to complete.  The reasons for this can be varied (hardware problems causing high iowait, swapping due to not enough memory, poorly or unconfigured MySQL system, not enough memory cpu processing for the load or a whole host of less obvious issues) and your hosting company should be able to look at the server and help you - there is little more that anyone would be able to do without that sort of access.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...