Forums / Install & configuration / Limiting data resources

Limiting data resources

Author Message

Mauro Innocenti

Friday 25 March 2005 2:41:34 am

I'm testing eZ in a linux box (Apache+PHP+MySQL).

I would want to limit in some way the data resources available to eZ (with limits configurable separately for each siteaccess...).
The scope of this is limiting the amount of data (folders, articles, files, etc.) the users my submit in a single siteaccess.

Thanks for any suggestion.

Bård Farstad

Tuesday 12 April 2005 12:46:52 am

Mauro,

eZ publish has current no function for limiting the amount of data you can insert. To create a limit for this you need to alter the function which creates new objects. This is located in kernel/content/action.php. Search for $class->instantiate(). This is the function which creates the actual object. Here you can add a limitation check to prevent creation of more than x objects.

--bård

Documentation: http://ez.no/doc

Mauro Innocenti

Wednesday 13 April 2005 1:29:41 am

Thank You Bård,
hacking the kernel functions is the powerful solution.

I think an alternate solution is creating a cron script (or adding some stuff to "cronjobs") for testing regularly the resource compsuntion of sites and limiting accordly the roles for users (no creation and no upload).

Anyway, what is Your ideas for the much useful "test or resource usage" for a single siteaccess (filesystem usage, DB usage, cache, ...)?

Xavier Dutoit

Thursday 14 April 2005 7:19:21 am

Hi Mauro,

Could you describe us the scenario of when you'd like to limit the amount of "things" created ?

If this is a commercial limitation (no more than X on the small pack), then I think that the easier to understand is the number of items (articles, folders...).

If this is a technical one, the size is the thing to monitor, then that's probably the size of the uploaded elements (files, images or multimedia) that matters.

Anyway, a not too bad place could be in an event in the publication workflow (before), isn't it ?

X+

http://www.sydesy.com

Mauro Innocenti

Thursday 14 April 2005 7:48:13 am

Hi X,
I want a technical (size) limitation.

My scenario is very similar to a "quota" limit (much like the "user quota" on Linux filesystems), in which I want to limit the total amount of data the users of a single siteaccess may own.
I want to be possible give to my users the equivalent of "max X MB of web space" for single web site.

I must read much carefully the workflow documentation...

Thanks.

Mauro

eZ debug

Timing: Jan 20 2025 00:35:05
Script start
Timing: Jan 20 2025 00:35:05
Module start 'content'
Timing: Jan 20 2025 00:35:05
Module end 'content'
Timing: Jan 20 2025 00:35:06
Script end

Main resources:

Total runtime0.1444 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.9688180.8359
Module start 'content' 0.00480.0047 769.804797.8828
Module end 'content' 0.00950.1349 867.6875526.1563
Script end 0.1443  1,393.8438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00342.3754200.0002
Check MTime0.00151.0068200.0001
Mysql Total
Database connection0.00070.461410.0007
Mysqli_queries0.103671.72091410.0007
Looping result0.00110.75941390.0000
Template Total0.134593.210.1345
Template load0.00100.713410.0010
Template processing0.133592.449010.1335
Override
Cache load0.00080.540110.0008
Sytem overhead
Fetch class attribute can translate value0.00090.630310.0009
XML
Image XML parsing0.00020.144710.0002
General
dbfile0.00221.5493200.0001
String conversion0.00000.002830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs