PHP comes with certain defaults, set in php.ini. Among these, scripts
time out after 60 seconds, I think. The default memory limit for a
script is, I believe, 8 megs.
I assume that when people do large-scale sites with PHP they scale
these numbers up. If you have a content management system running every
aspect of a large corporate web site, including a database back end
that employees use for important, secret, protected information, then I
imagine there is quite a lot of processing that might be needed for
every request.
A limit that I run into all the time is the memory limit. If I get a
large amount of info back from the database, and then try to store the
return in an array, it is easy to go over the default 8 meg limit.
So is it normal to scale up the default numbers? If so, by how much? 2 1554
>PHP comes with certain defaults, set in php.ini. Among these, scripts time out after 60 seconds, I think. The default memory limit for a script is, I believe, 8 megs.
I assume that when people do large-scale sites with PHP they scale these numbers up. If you have a content management system running every aspect of a large corporate web site, including a database back end that employees use for important, secret, protected information, then I imagine there is quite a lot of processing that might be needed for every request.
Just because the site is large doesn't mean more processing for
every request. Just because the site is small with only one user
doesn't mean it won't have huge result sets that won't fit in 8 meg
or do a bunch of crunching that will take an hour of CPU time. And
the CPU time limits don't apply to how much CPU time your database
queries use in the database process.
A limit that I run into all the time is the memory limit. If I get a large amount of info back from the database, and then try to store the return in an array, it is easy to go over the default 8 meg limit.
There's no way you can limit the result set further? (In MySQL,
if you want to paginate the output to, say, 10 items per page, the
LIMIT clause can be used to retrieve only those 10 items rather
than all of them, and then you only display the appropriate 10).
Of course, there are plenty of reasons you might need to see all
the data anyway. If it's not practical to limit the data retrieved,
then you need the memory, and I see nothing wrong setting the limit
higher.
Setting the CPU limit to very high numbers (e.g. 5 minutes and
upwards) when this is actually needed is likely to mean unsatisfied
users unless they are told (repeatedly) that it's normal for the
page to take a huge amount of time to display. Give them some
progress indication. Otherwise they keep aborting the request and
you'll have dozens of the same request running at once.
So is it normal to scale up the default numbers? If so, by how much?
Having a lot of users, a lot of requests per hour, and a lot of
pages is not much of a reason to up these limits. Having pages
that actually *NEED* the limits raised to function is a good reason
to raise the limits. The limits are essentially there to protect
against errors like infinite loops from dragging the whole site
down with it. Seat belts save lives but not if they are adjusted
so tight you can't breathe.
Gordon L. Burditt lk******@geocit ies.com wrote: PHP comes with certain defaults, set in php.ini. Among these, scripts time out after 60 seconds, I think. The default memory limit for a script is, I believe, 8 megs.
<snip> So is it normal to scale up the default numbers? If so, by how much?
No. If you're trying to cope with more traffic, then increasing the
resources which can be used by each process, and the length of time it can
hold on to the processes can only *reduce* the volume of traffic it can
cope with.
If these limits are causing problems you need to look elsewhere for the
answer.
If you just want to process more traffic, then follow the standard recipes
for tuning your webserver, and install a PHP accelerator (Zend, IonCude,
Turck etc).
HTH
C. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michael Appelmans |
last post by:
I'm a php novice and am developing a shopping cart application for a
client who is hosted on a unix server. The hosting service requires that
each php file have #!/usr/local/bin/php at the top. When I test these
pages on my developer Windows php installation I get errors because
Windows does not recognize the bang command so it is passed on as
content to the php server.
Any suggestions on hiding the first line from windows while still...
|
by: typingcat |
last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so
on. I've tried many PHP IDEs today, but almost non of them supported
Unicode (UTF-8) file.
I've found that the only Unicode support IDEs are DreamWeaver 8 and
Zend PHP Studio.
DreamWeaver provides full support for Unicode. However, DreamWeaver is
a web editor rather than a PHP IDE. It only supports basic IntelliSense
(or code completion) and doesn't have anything...
|
by: Bob Alston |
last post by:
Most of my Access database implementations have been fairly small in
terms of data volume and number of concurrent users. So far I haven't
had performance issues to worry about. <knock on wood>
But I am curious about what techniques those of you who have done higher
volume access implementations use to ensure high performance of the
database in a multi-user 100mbps LAN implementation???
Thanks
|
by: MrNobody |
last post by:
I was a Java developer so I'm used to using property files as a means to keep
configuration settings for my apps. I'm wondering what options are there with
..NET?
Some settings I want to include are like a root directory for a target
program on the user's machine my app uses, which they would be prompted to
supply at startup. Normally the registry is used for this but I'd rather not
use the registry if possible. Isn't there some kind of...
|
by: saunderl |
last post by:
Hello Everyone,
I'm a lead developer of a ASP.Net site. We have over 150
"applications" running at our site. Each application is a "Solution"
in VS. When we roll to test and production, the main dlls are rolled
to the sites single bin directory and the aspx, asmx etc files are
rolled to various folders on the server.
Now with ASP.Net 2.0 they changed everything. No longer is a web
project a project, its a SITE. The dll names are...
| |
by: werner |
last post by:
Hi!
I don't want to use eval() in order to parse a user-supplied formula.
What alternatives do I have? PHP has no standard functionality for
tokenizing or parsing expressions in this regard.
Here is a simple example: The user supplies the following formula in
string format,
"a = (6+10)/4",
and the script needs to find out what the value of 'a' is.
|
by: windandwaves |
last post by:
Hi Folk
I have to store up to eight boolean bits of information about an item
in my database.
e.g.
with restaurant
drive-through facility
yellow windows
|
by: alainpoint |
last post by:
I know Google are using Python for testing purposes.
But for the rest ?
is it PHP or Java or .NET?
Which technology is rendering the google main page?
And of course th obvious question, why not Python?
Alain
|
by: Michael |
last post by:
hey all,
I'm wondering what tools and techniques people use to do stuff with
PHP.
yes yes, I know it depends. but in general, let's say you have a BIG
project to complete, how would you do it?
there are programmers that all they use is direct PHP, there are some
people that use template engine and some database
abstraction , there are people that use some MVC
framework or something else.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |