Vi hade problem långa laddtider för modulen LL-XML i TYPO3-backend. Sidan tog extremt lång tid att ladda och apache-processen tog all tillgänglig CPU sedan man klickat på länken.
Vid en första anblick kan det verka som att servern inte orkar med uppgiften, men i kanske en tredjedel av fallen fungerade det bra med helt normala laddtider på max ett par sekunder. Det verkade vara styrt per session, så att om det fungerade en gång fortsatte det fungera så länge man var inloggad.
Apache-processen blev helt hängd, och fortsatte använda CPU även om man avbröt laddningen i webbläsaren, vilket är ett tecken på att något inte står rätt till. I dessa lägen är programmet strace det självklara valet om man vill kolla vad processen som missköter sig har för sig.
Strace kan användas för att starta ett program som man vill spåra, men i det här fallet är det mer praktiskt att ansluta till rätt process:
root@vps:~# strace -p 31178
Process 31178 attached - interrupt to quit
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//01547f7445be713ea625125aa41538fa", {st_mode=S_IFREG|0644, st_size=260, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015528df2b82ba126143fb0dbe2e5821", {st_mode=S_IFREG|0644, st_size=375, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//01552e0527323a1f8bbf9099f988072b", {st_mode=S_IFREG|0644, st_size=260, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0155637bf3b9726179c15746fd47f171", {st_mode=S_IFREG|0644, st_size=365, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0155b785fc1def48f8bdfc1dac6d5725", {st_mode=S_IFREG|0644, st_size=367, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0156398980bd30279e70ed18582e4677", {st_mode=S_IFREG|0644, st_size=260, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0156bc118c4a045e4129da0c201eaeca", {st_mode=S_IFREG|0644, st_size=366, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0157060bb78ac7abd1b1dd650f69cdff", {st_mode=S_IFREG|0644, st_size=370, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//01573eb8c0dc57695bb7b5386a276afd", {st_mode=S_IFREG|0644, st_size=101, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0157b91f54a624cac5e27fd99fbcf34c", {st_mode=S_IFREG|0644, st_size=373, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//01582ef9ed456ddf2f0b56610bfcfdb7", {st_mode=S_IFREG|0644, st_size=376, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0158e9828612624bddd23d33d6d6aa55", {st_mode=S_IFREG|0644, st_size=96, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//01598cc787af8db5ff2d1e5b2517f46c", {st_mode=S_IFREG|0644, st_size=370, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0159e68a2b13286ae9a2595bd4916f8b", {st_mode=S_IFREG|0644, st_size=256, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015a19fae9ac1b7bccbb78f7c32837ba", {st_mode=S_IFREG|0644, st_size=366, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015a87bebadbbec0f1cd61fcc7ae6d82", {st_mode=S_IFREG|0644, st_size=366, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015a8ffb16b99220e979fc009fb54359", {st_mode=S_IFREG|0644, st_size=261, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015b7a2a75b4d953bc17656310dabd87", {st_mode=S_IFREG|0644, st_size=367, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015b873fb7e06b8354fa9ece5dc5d47f", {st_mode=S_IFREG|0644, st_size=373, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015b8e0e2055dea1deb77c6aa8c9913c", {st_mode=S_IFREG|0644, st_size=364, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015bf3b077283e71760c4d702250979f", {st_mode=S_IFREG|0644, st_size=370, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015bf92a0e939a67ed225e4e656d07e4", {st_mode=S_IFREG|0644, st_size=365, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015d734ed3fd8f9881c336621e6748d2", {st_mode=S_IFREG|0644, st_size=260, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015d86aa3ed6074de2d99b6defa08aa1", {st_mode=S_IFREG|0644, st_size=363, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015db6bc81b8d335152b9a60ca25cd47", {st_mode=S_IFREG|0644, st_size=261, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015e280d5725e9e0bcce04c37a447239", {st_mode=S_IFREG|0644, st_size=372, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//015f0af528f3153d0f79140fe37d8ffb", {st_mode=S_IFREG|0644, st_size=376, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0160164f4e121f5d0e750e859c31660f", {st_mode=S_IFREG|0644, st_size=413, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//016092fa9a17d62e0e725f8541704a40", {st_mode=S_IFREG|0644, st_size=57, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0160c42232a54e68e90cef033501db2d", {st_mode=S_IFREG|0644, st_size=355, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0160f33f5c00f73a4dafd8d5d6ab0204", {st_mode=S_IFREG|0644, st_size=252, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//01614b4f1eb5f8c71f0c4f672c51b97c", {st_mode=S_IFREG|0644, st_size=371, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//016161fd95cd140b387bad4536d9715e", {st_mode=S_IFREG|0644, st_size=244, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0161b65b6d29b53db07cf0553d7b8db5", {st_mode=S_IFREG|0644, st_size=101, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//016263b476d21bb6922f532a5835c73e", {st_mode=S_IFREG|0644, st_size=244, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//01629c7dae97acd50aee3b8162d769d5", {st_mode=S_IFREG|0644, st_size=123, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0162a40e3f5b3bcd8bc323946102d303", {st_mode=S_IFREG|0644, st_size=370, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0162b79c0c3f5afa1e67ced8d5473821", {st_mode=S_IFREG|0644, st_size=370, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0162c0d8edc6ee297af85ab288f0e7e4", {st_mode=S_IFREG|0644, st_size=372, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0162f8141500fc971fafc53bfb769c83", {st_mode=S_IFREG|0644, st_size=373, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0163457bcee48c48338764c149e90754", {st_mode=S_IFREG|0644, st_size=372, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//016347cfbe15594b21e3195e756108bb", {st_mode=S_IFREG|0644, st_size=360, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0163b4d8ee9953ce79c3adf2c1189e3e", {st_mode=S_IFREG|0644, st_size=260, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0163bba0ef2f5eb0c916577736be7db2", {st_mode=S_IFREG|0644, st_size=374, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0163c3995d228c61d378a12b991c83fb", {st_mode=S_IFREG|0644, st_size=368, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0163e8c100aa3683d6531a6282f1ab5b", {st_mode=S_IFREG|0644, st_size=250, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0164379d800876b60872d70b78630bdf", {st_mode=S_IFREG|0644, st_size=250, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0164b5020067486ccc1ee4d5ce7c1fb5", {st_mode=S_IFREG|0644, st_size=367, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//01651433192243138e2bf7ed56bdf0ae", {st_mode=S_IFREG|0644, st_size=359, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//016580dea39292d663c98b08c4ec7f79", {st_mode=S_IFREG|0644, st_size=366, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0165c901a9f9e54f1ecb5d10e69d7882", {st_mode=S_IFREG|0644, st_size=375, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0165e29e950f1eef45ba5f281d477c1b", {st_mode=S_IFREG|0644, st_size=375, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//016627268377e640efb497a549e267ea", {st_mode=S_IFREG|0644, st_size=244, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//016639255842d87d06d79ea456b1d682", {st_mode=S_IFREG|0644, st_size=360, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//0166d7ffc21356020e277ebf70e9f429", {st_mode=S_IFREG|0644, st_size=366, ...}) = 0
stat("/mnt/persist/www/docroot/typo3conf/ext/pdf_generator2/html2ps/cache//01670bfa2517d227b17e15b9acf239e0", {st_mode=S_IFREG|0644, st_size=367, ...}) = 0
Vi ser alltså att processen läser filer som besatt i en temp-katalog som verkar tillhöra pdf_generator2. Förmodligen skannar LL-XML igenom mappar efter översättningsfiler, men här gick den tydligen på en mina. Vid närmare granskning visade sig mappen innehålla otroligt många filer. Rensning av dessa verkar ha löst problemet.