Can anyone tell how to find.........

Status
Not open for further replies.

ocbeachrat

New Member
Messages
2
Reaction score
0
Points
0
Hey guys,

I'm new and still laerning my way around the server system here, so please bear with me on this.

I have my site up and partially running. At least my basic HTML section is. Now, I use a php script called phpgedview, which uses a bit of memory for collation of data.

What I need to know is where I can find out how much memory usage I am allowed (16M, 32M, etc.) using php scripts.

Can someone tell me where to find this info, and is it possible to get this figure increased? I do know I have the script set for 32Meg, and am getting out of memory errors in working with the database(s).
 

ocbeachrat

New Member
Messages
2
Reaction score
0
Points
0
Hmmmm.....

So, in other words, to avoid having my account suspended because of "high resource usage", I shouldn't use my script which is the whole reason for changing servers!!!!!!!!!

I really like the way things are here, but, alas, it looks like this is not the place to try to have my website -- that really sucks after all the headaches I have been through this last week because of similar problems on my old server (which I still have-- so I can still go back to co.cc and change my nameservers back to my old host again.... geez.. at least I have an up and running installation there-- the servers here are MUCH faster, but I guess in this case, I will have to sacrifice speed for my users in order to even use the script -- another night ahead full of coffee and many many cigarettes in shutting this site down and changing back to the other.....

I guess I should not say this, but I will anyway -- I understand totally about having to limit resources, because of many users on a server at the same time, but in this day and age of content, content, content, with more sophisticated scripts, etc., doesn't 32M seem a bit small, especially on a modern-day server?

Yeah, I guess I'm whining a bit, and I do apologize for that.

Oh well -- live and learn...........
 

zen-r

Active Member
Messages
1,937
Reaction score
3
Points
38
Well, no-one's saying that you will get suspended with your script.

Try it & see - you can always unsuspend yourself if its resource usage goes too high.

Or you could always go to Paid here - there isn't any metering applied for that.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Yeah, I guess I'm whining a bit, and I do apologize for that.
Note that zen-r doesn't remember where the 32MB max comes from, which means you don't know what the limit applies to. Next time, perform more research and don't jump to conclusions.

To find the per-script memory limit set by the PHP engine (a good candidate for a 32MB limit; the default is 16MiB), examine the memory_limit configuration option. Remember, this is only the limit for individual scripts, not your process memory limit. You can get the current value using ini_get. See also memory_get_usage, memory_get_peak_usage and getrusage to get resource utilization, or use XDEBUG.

If you read the post zen-r linked to, you'd have seen that suspension for over-use of resources doesn't apply until you use more than 5% of system memory (currently 400MB) for over 1 minute. This means if each script takes 2s to run (a long time) and uses 32MB for the duration of the run (which is unrealistically high), you'd have to have over 360 consistent hits/minute (≈ 400 MB / 32 MB * 60 s/m / 2 s/hit) before the scripts would put you over your memory usage limit. This doesn't count other memory usage, such as for cron jobs.
 
Last edited:

zen-r

Active Member
Messages
1,937
Reaction score
3
Points
38
Last edited:
Status
Not open for further replies.
Top