11
geekwright
Re: Many users admin->users timing out, mysql pegged at 100% CPU

I started looking at what the users page queries, and I spot some things that are definitely going to be inefficient at scale, specifically this query as shown in the debugger:

SELECT DISTINCT u.* FROM users AS u LEFT JOIN groups_users_link AS m ON m.uid = u.uid WHERE ((`level` >= '0')) ORDER BY user_regdate DESC LIMIT 0, 20

I do not have a running XOOPS 2.5.4 system handy to check, but I will just assume it is similar. It has a guaranteed table scan, with a join, and a sort on a non-indexed column -- that's going to be problematic at scale. I'll look at this issue, but I'll be working from our newest code. I'm not sure at all how anything will backport at this point.

Thinking strictly on the MySQL side, when things make sudden jumps in resource usage, there is often a factor in how things are laid out on the disk volume, or some corruptions. I would try exporting the table, dropping and importing it. (On your scale, import is probably best done from mysql on the command line, not through phpMyAdmin.) That might smooth out a few things.

If that didn't do it, I might also try an index on the user_regdate column. That and the limit clause might be enough to reduce the physical i/o to manageable levels.

Another thing to consider, since your user delete was done outside of XOOPS, the groups_users_link table now contains entries where the uid no longer exists in the users table. The saving grace is the table row is very small, but it should have around 200000 dead rows.

NB - always make a backup, and work on an expendable copy NOT on your production data.



12
geekwright
Re: (More ?) Useful Tags in User Message Manager

Quote:

alain01 wrote:
Strange !
Why the {X_NAME} is not present for mailing by system / e-mail users (User message manager) ?

I know that this field could be empty but we can use like :

Dear {X_UNAME}  ({X_NAME})


Do you think it's possible to add this variable on the system module ? (User message manager)


I suspect that {X_NAME} was not included because it can be blank, so it can lead to confusing messages.

If we add it, I would suggest that we set it the same as {X_UNAME} if the name is empty. That would make it more dependable for normal use.

If that sounds useful, just open an issue for it on GitHub.



13
geekwright
Re: Module profile and translation update

Please see https://github.com/XOOPS/XoopsCore25/pull/841

It enables manual editing of the option text from a link at the bottom of the admin field edit form.



14
geekwright
Re: Module profile and translation update

Thank you for the more complete problem description. Wow, that sucks. I'll look deeper.



15
geekwright
Re: Module profile and translation update

After "profile" is installed, the definitive title and description source is no longer the language files, it is the database. You can edit all of that in the admin area -- much easier than saving tables and reinstalling since there are only 24 fields that could be affected.

I agree that the profile module's language support is limiting, but that is largely due to the ability to fully customize and extend the user definition. Needs improvement, but that it isn't likely to happen in the 2.5 series.



16
geekwright
Re: Help with Error redirections

I just want to make sure what you are asking for.

As I read this, it sounds to me that you want to intercept a URL
XOOPS_URL/?page=23
and have that instead result in an HTTP error, such as 404.

Is that correct?

Here are a few general observations.

While the link that is causing the issue is wrong, it is not technically an error. The custom error pages don't get called, as there is no HTTP error triggered. (The front page is found, and passed a query string it ignores.)

Something is creating the links that google follows. Until you find a correct that, there will still be a problem somewhere. Has anything been updated recently? As an example, I saw a module before with a XoopsPageNav error that generated links that looked a lot like this.

Goffy's suggestion about the search console sounded worthwhile.

Seeing the referrer for one of these problem URLs would pinpoint the actual source of the problem.

As a temporary solution, you could patch the XOOPS_ROOT_PATH/index.php

Adding this code on the next line after the opening "<?php" tag will cause any query string parameters to result in an error, and log the referrer if specified:
if (!empty($_GET)) {
    if (!empty(
$_SERVER['HTTP_REFERER'])) {
        @
file_put_contents(__DIR__ '/queryurllog.txt'$_SERVER['HTTP_REFERER'] . "n"FILE_APPEND);
    }
    
http_response_code(404);
    exit;
}



17
geekwright
Re: Cannot connect BDD Mysql

Where are you running the install code? On your local computer or on webcindario.com?

In the fourms at https://soporte.miarroba.com/ there are a number of problems reported because
mysql.webcindario.com does not accept external connections. The PHP code must be running on a webcindario.com server.



18
geekwright
Re: Github and language repository

Think about that in the other direction.

You have a your git clone of XOOPS-monxoops-Traduction-FR.
You also have your wamp accessible XoopsCore25.

Make a script (*.bat file) that will copy the htdoc directory from XOOPS-monxoops-Traduction-FR to the htdoc directory in XoopsCore25 (i.e. using robocopy). Add another line in the script to copy the upgrade directory, too. (You want to make sure you don't copy the ".git" folder as that would be bad.)

Now, adjust your workflow to edit your translation in your XOOPS-monxoops-Traduction-FR repository, then run the copy script to test everything in wamp.

If you automate this with a script, and always edit in the XOOPS-monxoops-Traduction-FR repository clone, you always have all the updates that need commited in the right place.

A couple of apologies:

Sorry that the language folders are so awkward to work with. Making the translations much easier to work with and install is a high priority in the next generation XoopsCore.

Also sorry to be vauge about the Windows commands -- last time I rebooted into Windows, I had to wait more that two hours for updates and I don't have that much time right now.



19
geekwright
Re: use line-break in tpl files

Quote:
goffy wrote: ... if I use
$xoopsMailer->assign('RESULT''Newsletter 1<br>Newsletter 2<br>Newsletter 3);
I get in the mails also Quote:
Newsletter 1
Newsletter 2
Newsletter 3
the same with \r\n, \r or \n how can I get a line break?
The string is defined in single quotes, so the \n and \r each are treated as 2 characters, not the control character you expect. https://www.php.net/manual/en/language ... ypes.string.syntax.single



20
geekwright
Re: Cannot enter in PUBLISHER module administration ... but "sometimes" ...

I had not realized the new module code was doing this. Cool feature.

I've got a few thoughts.

Looks like we should be checking the CURLINFO_RESPONSE_CODE with curl_getinfo() to make sure the return is a 200. A lot of other codes can be returned with a valid json body that are totally different than the releases body. An example is the 403 response code for a rate limit exceded error - https://developer.github.com/v3/#rate-limiting

We might also consider a more precise end point, like this:
https://api.github.com/repos/XoopsModu ... publisher/releases/latest

To be good github citizens, we should cache the results for some period of time so we don't generate hundreds of checks while doing publisher setup activities. The period could easily be an hour or more. Xmf\Module\Helper\Cache::cacheRead() could make that easy.

One last observation not directly related to this issue, since publisher can be cloned, it looks like this check will not get any data, or wrong data from another module.




TopTop
« 1 (2) 3 4 5 ... 22 »



Login

Username:
Password:

Lost Password? Register now!

Who's Online

77 user(s) are online (47 user(s) are browsing Support Forums)


Members: 0


Guests: 77


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits