• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cflock question

New Here ,
Aug 08, 2006 Aug 08, 2006

Copy link to clipboard

Copied


server 2003
dual Zeon 2.4 processors
2GB ram
Coldfusion 6.1

We have an application that people use to upload images. We found that the 3rd party component that we use to process images is using about 25% cpu per image that it processes. Because of this we added an exclusive lock around the processing code so that when we have simultaneous users processing images it doesn't grab all our server's cpu.

What's been happening lately is that we have users timing out (20 sec default) when trying to login to our application or perform other tasks within the application that are exclusively locked.

Does exclusively locking one piece of code affect other unrelated exclusively locked pieces of code within the same application? That seems to be what is happening and I would really appreciate anybody's input on this. Our cpu is at 25-30% during the locking timeout errors and the ram is 50% utilized. Not enough resources used to be timing out login requests I would think.

Should we be using named exclusive locks to seperate the image processing code from the login code or something else we have missed from the docs?

Thanks in advance for any insight to how this works.
TOPICS
Advanced techniques

Views

396

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 09, 2006 Aug 09, 2006

Copy link to clipboard

Copied

You would want to use a named lock for any code that accesses the image processing component.

e.g.
<cflock name="imgComponentLock" timeout=30 type="Exclusive">

If you want to only restrict access to a certain file you could use the filename as the lock name.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 09, 2006 Aug 09, 2006

Copy link to clipboard

Copied

Thanks Patyl. We will give it a try.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 09, 2006 Aug 09, 2006

Copy link to clipboard

Copied

the 3rd party component that we use to process images is using about 25% cpu per image

Then it's up to no good. Locks wont change that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 09, 2006 Aug 09, 2006

Copy link to clipboard

Copied

BKBK,

How much cpu do you think a component should use to process images?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 10, 2006 Aug 10, 2006

Copy link to clipboard

Copied

LATEST
BKBK,
How much cpu do you think a component should use to process images?

A percentage of at most a single digit. Unless, of course, the processing involves combing the WWW for saucy pics of Halle Berry.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation