TYPO3-Browser: localization - PHP Fatal error - performance
| Autor | Nachricht |
|---|---|
|
Verfasst am: 12. 01. 2012 [19:01]
|
|
|
sylv1
sylvain hess
Themenersteller
Dabei seit: 22.06.2011
Beiträge: 17
|
Hello, First: Thanks so much for this plugin, it's a phantastic tool for me ! I'm using the browser for this website: http://www.ipjj.org/en/resources/database/ The website is in english/spanish/french Sometimes, I have a blank page (the famous blank page of typo3 when php memory is over) if I check the page in spanish or french. I always have this error in the server error.log: PHP mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /.../web/typo3conf/ext/browser/pi1/[b]class.tx_browser_pi1_localization.php on line 1194[/b], referer: http://www.ipjj.org/es/recursos/base-de-datos/ Same in french. I don't understand: the main document table is localized, and all relational table (MM), like categories (topics,source,type,etc) have a "title_lang_ol". My setup language seems correct: TYPOSCRIPT ############# setup language config{ linkVars = L uniqueLinkVars = L sys_language_mode = content_fallback sys_language_overlay = 1 sys_language_uid = 0 language = en locale_all = en_GB htmlTag_langKey = en } plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 0 # French [globalVar = GP:L = 1] config{ sys_language_uid = 1 language = fr locale_all = fr_FR htmlTag_langKey = fr } plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 1 [global] # Spanish [globalVar = GP:L = 2] config{ sys_language_uid = 2 language = es locale_all = es_ES htmlTag_langKey = es } plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 2 [global] Unfortunatly, I'm not a php dev, more an integrator with knowledge in php, that's why I use the browser. Any help would be welcome! I have attached my ts, in case.. I can post the tca.php of my extension if needed.. I can even pay for help .. i'm lost in the cyberbrowserspace ^^ Thx so much, Sylvain (sorry for my bad english, mother language is french) [Dieser Beitrag wurde 3mal bearbeitet, zuletzt am 12.01.2012 um 19:10.] |
|
Verfasst am: 15. 01. 2012 [11:08]
|
|
|
ivofrie
Ivo
Dabei seit: 29.09.2010
Beiträge: 52
|
Hi Sylvain, You have an error in your TS-Configuration: uniqueLinkVars should be "0" or "1", not "L". TYPOSCRIPT uniqueLinkVars = 1Perhaps, your problem is allready solved with this hint? Your TS-Code for the Browser seems to be ok. Are you shure that all necessary js-files for the browser are included with correct paths? Cordiales salutations, Ivo [Dieser Beitrag wurde 1mal bearbeitet, zuletzt am 15.01.2012 um 11:08.] |
|
Verfasst am: 16. 01. 2012 [15:21]
|
|
|
sylv1
sylvain hess
Themenersteller
Dabei seit: 22.06.2011
Beiträge: 17
|
Hi Ivo, Thx for your help and thx for the error you find ! I've changed that but unfortunatly it change nothing for the error of php memory when I call the page in french or spanish... page is always blank.. I don't use any of the Browser JS because i don't use Ajax nor Jquery UI for pagination, so I think the problem isn't here... ? I only include the basis TS template for Browser. Jquery is used on the site, but I include it myself, with other script. The problem is solved when i call less table from the database in the select() part of the TS. But i need all the table field so.. The problem is also solved when i raise the php memory limit (but I can do that only for test and during 1 hour on my host provider). Maybe in the devlog : i have 4 warnings that i don't understand: 1) TYPOSCRIPT [WARN/SQL] In TCA is foreign_table_where configured. This may be a risk, because the browser won't process the clause: AND tx_ipjjdocs_topics.pid=###PAGE_TSCONFIG_IDLIST### ORDER BY tx_ipjjdocs_topics.title I use the "ORDER BY tx_ipjjdocs_topics.title" to get the list of "topics" (mm relation with the main document) in alphabetical order in the backend. Is this a problem ? How could I do it in an othe way ? 2)Concern single view TYPOSCRIPT WARN/SQL] The order clause has more than seven items! value is: 'tx_ipjjdocs_main.title, tx_ipjjdocs_main.docdate, tx_ipjjdocs_main.description, tx_ipjjdocs_main.topics, tx_ipjjdocs_main.files, tx_ipjjdocs_main.links, tx_ipjjdocs_author.title, tx_ipjjdocs_topics.title, tx_ipjjdocs_docstype.title, tx_ipjjdocs_source.title, tx_ipjjdocs_source.image, tx_ipjjmembers2_region.title'. It's the single view, i need all this data, but I dont't use OrderBy.. so maybe the error commes from that, but I don't understand why.. 3)Concern list view TYPOSCRIPT [INFO/SQL] Rows are ordered by PHP: array_multisort( 'tx_ipjjdocs_main.topten', SORT_DESC, SORT_STRING, <br ><img src="typo3conf/ext/mm_forum//res/smilies/icon_wink.gif" alt="icon_wink.gif" />;Level: 0 TYPOSCRIPT [WARN/UTF-8] multisort_rows() uses strtolower(). This is UTF-8 insecure and multibyte insecure! and the help, but i don't understand what is the cause.. TYPOSCRIPT [HELP/SQL+TCA] Change it? Please configure advanced.php.multisort.eval.sort_numeric.tca.csv_sortNumeric. 4)Concern the single view TYPOSCRIPT [INFO/WARN] Session array [ses][tx_browser_pi1][84] mode-1][uids_of_all_rows] is empty! Thx so much for your help, cordiales salutations, Sylvain [Dieser Beitrag wurde 8mal bearbeitet, zuletzt am 16.01.2012 um 16:46.] |
|
Verfasst am: 10. 02. 2012 [00:01]
|
|
|
dirk
Dirk Wildt
Dabei seit: 27.09.2010
Beiträge: 599
|
Hallo Sylvein, if you have a lot of relations, a lot of records and a lot of languages, you can get a bad performance by the browser. You can check, if the browser is the bottleneck on performance. The DRS of the Browser - this is a feature in the extension manager - reports SQL statements. Look for the main SQL statement, copy and paste it into PhpMyAdmin or a SQL console. The DRS reports performance prompts too. Kind regards Dirk --
Willst Du den TYPO3-Browser mit einer Spende unterstützen? Wir freuen uns über jeden EUR! Sponsoring: Ich will einfach einen Betrag spenden http://typo3-browser.de/sponsoring |
|
Verfasst am: 10. 02. 2012 [11:01]
|
|
|
sylv1
sylvain hess
Themenersteller
Dabei seit: 22.06.2011
Beiträge: 17
|
"dirk" schrieb: Hallo Sylvein, if you have a lot of relations, a lot of records and a lot of Hallo Dirk, Thank you for you help and comments. The thing is very strange, because in the default language (english), everything is fine. The memory seems to explode when I request one of the other 2 languages ( french or spanish), and I already have 128MB for php. Even with 192MB (i can do a test for an hour on my host account), nothing is better.. It's a fact, that I have many records (~ 400 and more in the future), and 6 relations for each record (like: topics, author, region, etc.) Maybe i need to refine/add some "index" in the database ? the browser seems to do it already.. I'm not expert in database optimisation). I did MM_relations because of future evolution (filter by author, topics, etc from the main records), but actually i use it only in one way (the main record is only listing the relation, no link). Do you think the problem could be resolve with simple relations ? So I will continue to search a solution, because it's a real problem now. I'm already working on it for 2 month now...!) For info, (I think this is the main sql statements) when i paste it in phpmyadmin, this is the reslut in perf, seems to be good ? Affichage des lignes 0 - 8409 ( 8 410 total, Traitement en 0.3187 sec) Profile: starting 0.000029 checking query cache for query 0.000295 checking permissions 0.000007 checking permissions 0.000005 checking permissions 0.000005 checking permissions 0.000004 checking permissions 0.000004 checking permissions 0.000004 checking permissions 0.000005 checking permissions 0.000004 checking permissions 0.000005 checking permissions 0.000004 checking permissions 0.000006 Opening tables 0.001877 System lock 0.000012 Table lock 0.000112 init 0.000129 optimizing 0.000050 statistics 0.000557 preparing 0.000052 executing 0.000007 Sending data 0.314828 end 0.000030 query end 0.000008 freeing items 0.000055 logging slow query 0.000009 cleaning up 0.000009 The main sql statement: SQL SELECT tx_ipjjdocs_main.title AS 'tx_ipjjdocs_main.title', tx_ipjjdocs_main.docdate AS 'tx_ipjjdocs_main.docdate', tx_ipjjdocs_main.description AS 'tx_ipjjdocs_main.description', tx_ipjjdocs_main.topics AS 'tx_ipjjdocs_main.topics', tx_ipjjdocs_main.files AS 'tx_ipjjdocs_main.files', tx_ipjjdocs_main.links AS 'tx_ipjjdocs_main.links', tx_ipjjdocs_author.title AS 'tx_ipjjdocs_author.title', tx_ipjjdocs_topics.title AS 'tx_ipjjdocs_topics.title', tx_ipjjdocs_docstype.title AS 'tx_ipjjdocs_docstype.title', tx_ipjjdocs_source.title AS 'tx_ipjjdocs_source.title', tx_ipjjdocs_source.image AS 'tx_ipjjdocs_source.image', tx_ipjjmembers2_region.title AS 'tx_ipjjmembers2_region.title', tx_ipjjdocs_docstype.uid AS 'tx_ipjjdocs_docstype.uid', tx_ipjjdocs_source.uid AS 'tx_ipjjdocs_source.uid', tx_ipjjdocs_topics.uid AS 'tx_ipjjdocs_topics.uid', tx_ipjjmembers2_region.uid AS 'tx_ipjjmembers2_region.uid', tx_ipjjdocs_main.uid AS 'tx_ipjjdocs_main.uid', tx_ipjjdocs_author.uid AS 'tx_ipjjdocs_author.uid', tx_ipjjdocs_topics.uid AS 'tx_ipjjdocs_topics.uid', tx_ipjjdocs_docstype.uid AS 'tx_ipjjdocs_docstype.uid', tx_ipjjdocs_source.uid AS 'tx_ipjjdocs_source.uid', tx_ipjjmembers2_region.uid AS 'tx_ipjjmembers2_region.uid', tx_ipjjdocs_main_author_mm.sorting AS 'tx_ipjjdocs_main_author_mm.sorting', tx_ipjjdocs_main_region_mm.sorting AS 'tx_ipjjdocs_main_region_mm.sorting', tx_ipjjdocs_main_docstype_mm.sorting AS 'tx_ipjjdocs_main_docstype_mm.sorting', tx_ipjjdocs_main_source_mm.sorting AS 'tx_ipjjdocs_main_source_mm.sorting', tx_ipjjdocs_main_topics_mm.sorting AS 'tx_ipjjdocs_main_topics_mm.sorting' FROM tx_ipjjdocs_main LEFT JOIN tx_ipjjdocs_main_author_mm ON ( tx_ipjjdocs_main.uid = tx_ipjjdocs_main_author_mm.uid_local ) LEFT JOIN tx_ipjjdocs_author ON ( tx_ipjjdocs_main_author_mm.uid_foreign = tx_ipjjdocs_author.uid AND tx_ipjjdocs_author.deleted=0 AND tx_ipjjdocs_author.hidden=0 AND tx_ipjjdocs_author.starttime<=1328869800 AND (tx_ipjjdocs_author.endtime=0 OR tx_ipjjdocs_author.endtime>1328869800) AND (tx_ipjjdocs_author.fe_group='' OR tx_ipjjdocs_author.fe_group IS NULL OR tx_ipjjdocs_author.fe_group='0' OR FIND_IN_SET('0',tx_ipjjdocs_author.fe_group) OR FIND_IN_SET('-1',tx_ipjjdocs_author.fe_group)) AND tx_ipjjdocs_author.pid IN (66,85,86,87,88,89,91,92,93,94,96,97,98,64,65,69,70,71,52,35,52) ) LEFT JOIN tx_ipjjdocs_main_region_mm ON ( tx_ipjjdocs_main.uid = tx_ipjjdocs_main_region_mm.uid_local ) LEFT JOIN tx_ipjjmembers2_region ON ( tx_ipjjdocs_main_region_mm.uid_foreign = tx_ipjjmembers2_region.uid AND tx_ipjjmembers2_region.deleted=0 AND tx_ipjjmembers2_region.hidden=0 AND tx_ipjjmembers2_region.pid IN (66,85,86,87,88,89,91,92,93,94,96,97,98,64,65,69,70,71,52,35,52) ) LEFT JOIN tx_ipjjdocs_main_docstype_mm ON ( tx_ipjjdocs_main.uid = tx_ipjjdocs_main_docstype_mm.uid_local ) LEFT JOIN tx_ipjjdocs_docstype ON ( tx_ipjjdocs_main_docstype_mm.uid_foreign = tx_ipjjdocs_docstype.uid AND tx_ipjjdocs_docstype.deleted=0 AND tx_ipjjdocs_docstype.hidden=0 AND tx_ipjjdocs_docstype.pid IN (66,85,86,87,88,89,91,92,93,94,96,97,98,64,65,69,70,71,52,35,52) ) LEFT JOIN tx_ipjjdocs_main_source_mm ON ( tx_ipjjdocs_main.uid = tx_ipjjdocs_main_source_mm.uid_local ) LEFT JOIN tx_ipjjdocs_source ON ( tx_ipjjdocs_main_source_mm.uid_foreign = tx_ipjjdocs_source.uid AND tx_ipjjdocs_source.deleted=0 AND tx_ipjjdocs_source.hidden=0 AND tx_ipjjdocs_source.pid IN (66,85,86,87,88,89,91,92,93,94,96,97,98,64,65,69,70,71,52,35,52) ) LEFT JOIN tx_ipjjdocs_main_topics_mm ON ( tx_ipjjdocs_main.uid = tx_ipjjdocs_main_topics_mm.uid_local ) LEFT JOIN tx_ipjjdocs_topics ON ( tx_ipjjdocs_main_topics_mm.uid_foreign = tx_ipjjdocs_topics.uid AND tx_ipjjdocs_topics.deleted=0 AND tx_ipjjdocs_topics.hidden=0 AND tx_ipjjdocs_topics.pid IN (66,85,86,87,88,89,91,92,93,94,96,97,98,64,65,69,70,71,52,35,52) ) WHERE tx_ipjjdocs_main.deleted=0 AND tx_ipjjdocs_main.hidden=0 AND tx_ipjjdocs_main.starttime<=1328869800 AND (tx_ipjjdocs_main.endtime=0 OR tx_ipjjdocs_main.endtime>1328869800) AND (tx_ipjjdocs_main.fe_group='' OR tx_ipjjdocs_main.fe_group IS NULL OR tx_ipjjdocs_main.fe_group='0' OR FIND_IN_SET('0',tx_ipjjdocs_main.fe_group) OR FIND_IN_SET('-1',tx_ipjjdocs_main.fe_group)) AND tx_ipjjdocs_main.sys_language_uid <= 0 AND tx_ipjjdocs_main.pid IN (66,85,86,87,88,89,91,92,93,94,96,97,98,64,65,69,70,71,52,35,52) Thx for all, the browser is just perfect for me (I'm more a webdesigner than a php dev Kind regards, Sylvain [Dieser Beitrag wurde 5mal bearbeitet, zuletzt am 10.02.2012 um 12:06.] |
|
Verfasst am: 10. 02. 2012 [19:39]
|
|
|
dirk
Dirk Wildt
Dabei seit: 27.09.2010
Beiträge: 599
|
Dear Sylvain, Thanks for your report. First: It seems that the SQL statement generated by the Browser is proper. It needed 0.3 seconds. This is fine. Second: The Browser stores the result in a PHP array. The result means: all rows. Not only the displayed rows. Every relation doubles the rows. A second language doubles it again. This is the calculation: 400 rows x 2 (first relation) x (2) second relation x ... x 2 (second language) Your case with six relation and an extra language: 400 rows x 2 x 2 x 2 x 2 x 2 x 2 x 2 = 51,200 rows This is able to blast away your allowed memory. If you can't increase your memory, you must reduce the relations. Maybe we will re-engineer the consolidation modul of the Browser but not in version 4.0. Kind regards Dirk --
Willst Du den TYPO3-Browser mit einer Spende unterstützen? Wir freuen uns über jeden EUR! Sponsoring: Ich will einfach einen Betrag spenden http://typo3-browser.de/sponsoring |
Powered by TYPO3 und mm_forum Extension


