Debugger Options and Memory Usage

3 views
Skip to first unread message

Phil -- wbtc.fr --

unread,
Aug 6, 2010, 5:02:02 PM8/6/10
to in-port...@googlegroups.com
Hello,

I'm on v510, and I'm using debugger.

I came to this in source code on a partially loaded home page:

<b>Fatal error</b>:  Allowed memory size of 52428800 bytes exhausted (tried to allocate 146 bytes) in <b>/var/www/vhosts/guideduvignoble.fr/httpdocs/core/kernel/utility/debugger.php</b> on line <b>678</b>

Should I worry?
Phil.

Alexander Obuhovich

unread,
Aug 7, 2010, 6:47:29 AM8/7/10
to in-port...@googlegroups.com
Interesting. What the template it is? Is it always happening on that template or sometimes?

--
You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
To post to this group, send email to in-port...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.



--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Phil -- wbtc.fr --

unread,
Aug 7, 2010, 5:25:18 PM8/7/10
to in-port...@googlegroups.com
It was using advanced v1.1.0 theme, under v510.
I had this occuring only once, and I was loading debug toolbar.
I was refreshing the theme many times to see changes while modifying CSS

I've deactivated toolbar, I'll let you know if it happens again.


2010/8/7 Alexander Obuhovich <aik....@gmail.com>

Phil

unread,
Aug 11, 2010, 12:05:53 PM8/11/10
to In-Portal Bugs Team
when we use debug mode and we refresh pages all day long for design
dev purpose, we end up with a blank page.

[client 82.251.90.16] PHP Fatal error: Allowed memory size of
52428800 bytes exhausted (tried to allocate 4677721 bytes) in /var/www/
vhosts/guideduvignoble.fr/httpdocs/core/kernel/utility/debugger.php on
line 675

On 7 août, 23:25, "Phil -- wbtc.fr --" <p...@wbtc.fr> wrote:
> It was using advanced v1.1.0 theme, under v510.
> I had this occuring only once, and I was loading debug toolbar.
> I was refreshing the theme many times to see changes while modifying CSS
>
> I've deactivated toolbar, I'll let you know if it happens again.
>
> 2010/8/7 Alexander Obuhovich <aik.b...@gmail.com>
>
> > Interesting. What the template it is? Is it always happening on that
> > template or sometimes?
>
> > On Sat, Aug 7, 2010 at 12:02 AM, Phil -- wbtc.fr -- <p...@wbtc.fr> wrote:
>
> >> Hello,
>
> >> I'm on v510, and I'm using debugger.
>
> >> I came to this in source code on a partially loaded home page:
>
> >> <b>Fatal error</b>:  Allowed memory size of 52428800 bytes exhausted
> >> (tried to allocate 146 bytes) in <b>/var/www/vhosts/
> >> guideduvignoble.fr/httpdocs/core/kernel/utility/debugger.php</b> on line
> >> <b>678</b>
>
> >> Should I worry?
> >> Phil.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "In-Portal Bugs Team" group.
> >> To post to this group, send email to in-port...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsu...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/in-portal-bugs?hl=en.
>
> > --
> > Best Regards,
>
> >http://www.in-portal.com
> >http://www.alex-time.com
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "In-Portal Bugs Team" group.
> > To post to this group, send email to in-port...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsu...@googlegroups.com>
> > .

Alexander Obuhovich

unread,
Aug 11, 2010, 12:22:39 PM8/11/10
to in-port...@googlegroups.com
Any specific page or each time different page?

To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.

Phil -- wbtc.fr --

unread,
Aug 11, 2010, 4:20:48 PM8/11/10
to in-port...@googlegroups.com
we were working only on index page

2010/8/11 Alexander Obuhovich <aik....@gmail.com>

Alexander Obuhovich

unread,
Aug 14, 2010, 4:28:12 AM8/14/10
to in-port...@googlegroups.com
Good news for you. I've been able to isolate and fix that problem on you server. Situation was as follows:
  • you got 4 enable themes (only one is actually used) and therefore one category is created for each template + your manually added categories = 1500 categories
  • you use PHP4, which doesn't handle "passing data by reference" normally

On menu display stage attempt was build to scan all categories and create menu and then put it to cache. That putting part failed, because same line of code was acting differently on PHP4 and PHP5.

I've noticed that only, while debugging your database.

I've already applied fix that vineyard site of yours. Here is the patch if you ever need to use it on other 5.1.0 installations. Confirmed, that there was no such problem on 5.0.4 version.

I'll recommend to disable themes that are not in use and delete sections (with red folder icon), that are associated with them.

Task: http://tracker.in-portal.org/view.php?id=827

Ready for testing.

Phil, you could just continue developing that site and if for sometime you won't see that problem, then you can mark mentioned above task as tested.
php4_and_cached_menu_eating_memory_fix.patch

Alexander Obuhovich

unread,
Aug 14, 2010, 4:54:12 AM8/14/10
to in-port...@googlegroups.com
I also propose to store menu cache for each theme separately, so it won't be taking too long to build it in first place, event if someone will have 10 themes enabled at the same time.

Phil -- wbtc.fr --

unread,
Aug 14, 2010, 7:30:25 AM8/14/10
to in-port...@googlegroups.com
thanks for fixing.

Isolating theme is a good idea, because along with site domain
function, we are likely to have many themes...

2010/8/14 Alexander Obuhovich <aik....@gmail.com>:

Alexander Obuhovich

unread,
Aug 14, 2010, 10:14:35 AM8/14/10
to in-port...@googlegroups.com
I've also improved menu cache building scheme. Now when you have 1500 categories, then it performs once database query instead of 1500 queries to get children of each category.
performance_improvement_to_menu_cache_builder.patch
Message has been deleted

Phil

unread,
Oct 1, 2010, 8:29:01 AM10/1/10
to In-Portal Bugs Team
Alex,

I have again PHP Fatal error: Allowed memory size of 52428800 bytes
exhausted (tried to allocate 3261092 bytes) in [GDV] on line 432

Any idea?
thanks

On 14 août, 16:14, Alexander Obuhovich <aik.b...@gmail.com> wrote:
> I've also improved menu cache building scheme. Now when you have 1500
> categories, then it performs once database query instead of 1500 queries to
> get children of each category.
>
> On Sat, Aug 14, 2010 at 2:30 PM, Phil -- wbtc.fr -- <p...@wbtc.fr> wrote:
>
>
>
> > thanks for fixing.
>
> > Isolating theme is a good idea, because along with site domain
> > function, we are likely to have many themes...
>
> > 2010/8/14 Alexander Obuhovich <aik.b...@gmail.com>:
> > > I also propose to store menu cache for each theme separately, so it won't
> > be
> > > taking too long to build it in first place, event if someone will have 10
> > > themes enabled at the same time.
>
> > > On Sat, Aug 14, 2010 at 11:28 AM, Alexander Obuhovich <
> > aik.b...@gmail.com>
> > >> On Wed, Aug 11, 2010 at 11:20 PM, Phil -- wbtc.fr -- <p...@wbtc.fr>
> > wrote:
>
> > >>> we were working only on index page
>
> > >>> 2010/8/11 Alexander Obuhovich <aik.b...@gmail.com>
>
> > >>>> Any specific page or each time different page?
>
> > <in-portal-bugs%2Bunsu...@googlegroups.com<in-portal-bugs%252Buns...@googlegroups.com>
>
> > >>>>> > >> .
> > >>>>> > >> For more options, visit this group at
> > >>>>> > >>http://groups.google.com/group/in-portal-bugs?hl=en.
>
> > >>>>> > > --
> > >>>>> > > Best Regards,
>
> > >>>>> > >http://www.in-portal.com
> > >>>>> > >http://www.alex-time.com
>
> > >>>>> > > --
> > >>>>> > > You received this message because you are subscribed to the
> > Google
> > >>>>> > > Groups
> > >>>>> > > "In-Portal Bugs Team" group.
> > >>>>> > > To post to this group, send email to
> > >>>>> > > in-port...@googlegroups.com.
> > >>>>> > > To unsubscribe from this group, send email to
>
> > >>>>> > > in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsu...@googlegroups.com>
> > <in-portal-bugs%2Bunsu...@googlegroups.com<in-portal-bugs%252Buns...@googlegroups.com>
>  performance_improvement_to_menu_cache_builder.patch
> 3KAfficherTélécharger

Phil

unread,
Oct 1, 2010, 8:40:12 AM10/1/10
to In-Portal Bugs Team
other info:

Fatal Error: Got a packet bigger than 'max_allowed_packet' bytes
(1153) [REPLACE INTO `Cache` (`VarName`,`Data`,`Cached`,`LifeTime`)
VALUES ('cms_menu','a:48:{s:2:\"c2\";a:27:{s:10:\"CategoryId\";s:
1:\"2\";s:6:\"ItemId\";s:2:\"c2\";s:12:\"ItemPriority\";s:2:\"-1\";s:
11:\"l1_ItemName\";s:22:\"Discover the vineyards\";s:11:\"l2_ItemName
\";s:24:\"Découvrir les vignobles\";s:11:\"l3_ItemName\";s:18:\"葡萄种植地区
\";s:11:\"l4_ItemName \";s:0:\"\";s:11:\"l5_ItemName\";s:
22:\"Descubrir los viñedos\";s:11:\"l6_ItemName\";s:21:\"Descobrir os
vinhedos\";s:11:\"l7_ItemName\";s:37:\"Auf Entdeckungstour unserer
Weinberge\";s:11:\"l8_ItemName\";s:57:\"На знакомство с виноградниками
\";s:11:\"l9_ItemName\";s:42:\"おすすめのセレクトワイナリー\";s:12: \"l10_ItemName
\";s:0:\"\";s:12:\"l11_ItemName\";s:23:\"Ontdek onze wijngaarden\";s:
12:\"l12_ItemName\";s:18:\"Scoprire i vigneti\";s:8:\"ItemPath\";s:
4:\"id:2\";s:10:\"ParentPath\";s:5:\"|1|2|\";s:8:\"ParentId\";s:
1:\"1\";s:8:\"ItemType\";s:3:\" in w:\core\kernel\application.php on
line 2713

Alexander Obuhovich

unread,
Oct 1, 2010, 12:23:48 PM10/1/10
to in-port...@googlegroups.com
Related to "other info" you have 1MB max query size in your MySQL server. Since you like to copy-paste "advanced" theme clones, that create a lot categories, then all menus from all themes combined can be more then 1MB in serialized format.

I recommend to raise "max_allowed_packet" variable in "my.cnf" file to at least 32MB (see proper format in MySQL documentation).


Related to eaten memory "on line 432" isn't enough, filename, where that 432 line is will be useful too.
Also is that problem reproducible on any particular page or it is "index" as before?

To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.

Phil -- wbtc.fr --

unread,
Oct 1, 2010, 5:07:06 PM10/1/10
to in-port...@googlegroups.com
I have 3 themes actually, and I hope the system could handle really
more, being able to use site domain without any worry.
The error happens everytime I activate debug now, then I'll put a
higher value as you propose.

I've noticed that serialized menu take a lot of place in memory
because it takes all themes AND all languages at the same time, is it
really necessary?

2010/10/1 Alexander Obuhovich <aik....@gmail.com>:

Dmitry A.

unread,
Oct 3, 2010, 11:37:41 PM10/3/10
to In-Portal Bugs Team
Hi Phil,


Yes, system can definitely handle more than 3 themes and multiple
languages, but there some custom tuning might be required to have it
all working with more then 5 Languages.

To sum up all together and better address your case, please indicate:

1. How many total and active Themes and Languages you have?
2. How many Records are in your Categories table in you do browse via
phpMyAdmin?


Thanks.

DA.

On Oct 1, 4:07 pm, "Phil -- wbtc.fr --" <p...@wbtc.fr> wrote:
> I have 3 themes actually, and I hope the system could handle really
> more, being able to use site domain without any worry.
> The error happens everytime I activate debug now, then I'll put a
> higher value as you propose.
>
> I've noticed that serialized menu take a lot of place in memory
> because it takes all themes AND all languages at the same time, is it
> really necessary?
>
> 2010/10/1 Alexander Obuhovich <aik.b...@gmail.com>:
>
>
>
> > Related to "other info" you have 1MB max query size in your MySQL server.
> > Since you like to copy-paste "advanced" theme clones, that create a lot
> > categories, then all menus from all themes combined can be more then 1MB in
> > serialized format.
>
> > I recommend to raise "max_allowed_packet" variable in "my.cnf" file to at
> > least 32MB (see proper format in MySQL documentation).
>
> > Related to eaten memory "on line 432" isn't enough, filename, where that 432
> > line is will be useful too.
> > Also is that problem reproducible on any particular page or it is "index" as
> > before?
>
> >> > > > >>>>> > >> in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsubscribe@go oglegroups.com>
>
> >> > > > <in-portal-bugs%2Bunsu...@googlegroups.com<in-portal-bugs%252Bunsubscri b...@googlegroups.com>
>
> >> > > > >>>>> > >> .
> >> > > > >>>>> > >> For more options, visit this group at
> >> > > > >>>>> > >>http://groups.google.com/group/in-portal-bugs?hl=en.
>
> >> > > > >>>>> > > --
> >> > > > >>>>> > > Best Regards,
>
> >> > > > >>>>> > >http://www.in-portal.com
> >> > > > >>>>> > >http://www.alex-time.com
>
> >> > > > >>>>> > > --
> >> > > > >>>>> > > You received this message because you are subscribed to
> >> > > > >>>>> > > the
> >> > > > Google
> >> > > > >>>>> > > Groups
> >> > > > >>>>> > > "In-Portal Bugs Team" group.
> >> > > > >>>>> > > To post to this group, send email to
> >> > > > >>>>> > > in-port...@googlegroups.com.
> >> > > > >>>>> > > To unsubscribe from this group, send email to
>
> >> > > > >>>>> > > in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsubscribe@go oglegroups.com>
>
> >> > > > <in-portal-bugs%2Bunsu...@googlegroups.com<in-portal-bugs%252Bunsubscri b...@googlegroups.com>
>
> >> > > > >>>>> > > .
> >> > > > >>>>> > > For more options, visit this group at
> >> > > > >>>>> > >http://groups.google.com/group/in-portal-bugs?hl=en.
>
> >> > > > >>>>> --
> >> > > > >>>>> You received this message because you are subscribed to the
> >> > > > >>>>> Google
> >> > > > >>>>> Groups "In-Portal Bugs Team" group.
> >> > > > >>>>> To post to this group, send email to
> >> > > > >>>>> in-port...@googlegroups.com
> >> > > > .
> >> > > > >>>>> To unsubscribe from this group, send email to
>
> >> > > > >>>>> in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsubscribe@go oglegroups.com>
> >> > > > .
> >> > > > >>>>> For more options, visit this group at
> >> > > > >>>>>http://groups.google.com/group/in-portal-bugs?hl=en.
>
> >> > > > >>>> --
> >> > > > >>>> Best Regards,
>
> >> > > > >>>>http://www.in-portal.com
> >> > > > >>>>http://www.alex-time.com
>
> >> > > > >>>> --
> >> > > > >>>> You received this message because you are subscribed to the
> >> > > > >>>> Google
> >> > > > >>>> Groups "In-Portal Bugs Team"
>
> ...
>
> read more »

Alexander Obuhovich

unread,
Oct 4, 2010, 2:40:31 AM10/4/10
to in-port...@googlegroups.com
Phil has ~ 2000 categories, 4 themes, 10 languages.

That all combined results "cms_menu" cache variable, that holds cached Front-end menu to became ~1MB in serialized form. Because of MySQL configuration variable "max_allowed_packet" size (on Phil's server) is set to 1MB, then that SQL saving that cache fails every time it tries to did that.

I'm recommending to increase that MySQL configuration variable to 32MB and to check for such a problem before In-Portal installation is made.

To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.

Phil -- wbtc.fr --

unread,
Oct 4, 2010, 4:10:49 AM10/4/10
to in-port...@googlegroups.com
thanks for answering Alex.

About checking at install stage, I'd recommend to use it as a warning, as I'm not sure we can modify this value from vhosts httpdconf file.

I'm changed this value on the server, restarted MySQL, but the error still occurs, when I try to clear template cache for example...

Here is my actual configuration:
key_buffer = 512M
max_allowed_packet = 64M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 32M
query_cache_size = 32M
max_connections = 350

By the way, shoud I worry about the last line, as a limit for simultaneous users serving at a correct speed?

2010/10/4 Alexander Obuhovich <aik....@gmail.com>

Alexander Obuhovich

unread,
Oct 4, 2010, 4:18:58 AM10/4/10
to in-port...@googlegroups.com
Here is my actual configuration:

I don't know much about configuring servers, only parts that prevents In-Portal from working normally ;)



I'm changed this value on the server, restarted MySQL, but the error still occurs, when I try to clear template cache for example...

Still occurs (see other mail about T_DOC_COMMENT constant). I've enabled debug mode and performed "Clear Template Cache" and visited front-end. I've also tried to clear menu cache and then visited front-end.

Phil -- wbtc.fr --

unread,
Oct 4, 2010, 5:01:56 AM10/4/10
to in-port...@googlegroups.com
2010/10/4 Alexander Obuhovich <aik....@gmail.com>

Here is my actual configuration:

I don't know much about configuring servers, only parts that prevents In-Portal from working normally ;)

:)

I'm changed this value on the server, restarted MySQL, but the error still occurs, when I try to clear template cache for example...

Still occurs (see other mail about T_DOC_COMMENT constant). I've enabled debug mode and performed "Clear Template Cache" and visited front-end. I've also tried to clear menu cache and then visited front-end.

ok thanks, seems to work now
 
Reply all
Reply to author
Forward
0 new messages