Skip to main content ↑ ↓
Recent Posts
21
Bug Reports / Re: PhpSessionId & Cookies
Last post by Spuds -
I going to start by writing down what the system should be doing and lets go from there, meaning is it not doing this or it is doing this buts its wrong.

  • Neither Local nor Global is checked: Standard single domain or single subdomain forums (forum.example.com or example.com).  This generally should maximize compatibility while preventing subdomain cross talk / cookie leakage.  This is how this site is setup.

  • Enable Local Cookies (localCookies) checked: Multiple distinct forum/app installations sharing the exact same hostname and path (e.g., example.com/forum1 vs example.com/forum2).  Scopes cookies strictly to the subfolder, and disables login persistence in parent directories.

  • Enable Global Cookies (globalCookies) checked: A single login required across different subdomains (e.g., sharing login between forum.example.com and www.example.com). Allows subdomain session sharing, but requires proper domain scope entry in the "Main domain used for subdomain" (globalCookiesDomain) to avoid conflicts.  I will note that if not filled in, ElkArte will set a default one (like .example.com) however it will fail to this correctly if the domain contains a ccTLD  such as .sch.my, .co.uk, or .com.au
22
Bug Reports / Re: PhpSessionId & Cookies
Last post by ScottJB -
What about sites that use like a CMS that also logs cookies, as top then the forum as sub?
ElkArte here has everything logged into the same, but some sites have 2 different, one for main site and one for the forum.
I think it should be where it's easily set to how the admin wants it, whether the main domain, or subdomain.
If using just a directory, instead of sub-domain, then make it cover the whole domain, perhaps?
23
Bug Reports / PhpSessionId & Cookies
Last post by Hj Ahmad Rasyid Hj Ismail -
I am not sure whether I should talk about this in close thread or an open one, but I decided the later might be best. I guess phpsessionid and cookies should by default use the forum set domain, not its top level domain, but since 1.0 (even smf), it has been using top level domain. I am not sure how this forum which should have the same built manage to set it correctly to www.elkarte.net. In mine, phpsessionid always remain the tld .sch.my, while for cookies, I only manage to set it to the forum domain using subdomain cookies settings, and add into the column below it the forum domain, elkarte.sch.my for 1.1 and elkarte2.sch.my for 2.0. I think it shouldn't be like that, and the default must always use the fully qualified domain name set for the forum, as well as its path/dir, if using any. Is the file for session used in this forum different causing phpsessionid to be correctly using FQDN set for the forum?
24
Bug Reports / Re: Slow Page Load time
Last post by Hj Ahmad Rasyid Hj Ismail -
Edited: Only some like redis didn't show status. I'll test more later.

In the meantime, I think "memcache" is broken / wrongly detected, as setting it breaks the forum. Others seemed fine but Redis is not showing status as mentioned above.
25
Bug Reports / Re: Slow Page Load time
Last post by Spuds -
In the Admin area where you set the cache engine check the "cache status" section (new in 2.0) it will show you some details of what the cache is doing and most importantly if its working.  The miss rate will be high on a test site with no real traffic, but it will show that it connected and using the cache.
27
Bug Reports / Re: Slow Page Load time
Last post by Spuds -
Interesting finding on the cache, I'll have a second look at the cache off code. 

Definitely worth the time setting up Gzip for your static (txt based) assets, it will make a nice improvement to your sites.

Elk20 does have support for Redis cache I've not used it myself other than some basic tests.
28
Bug Reports / Re: Slow Page Load time
Last post by Hj Ahmad Rasyid Hj Ismail -
Sighed. It was server settings for caching. Simply setting it to 1st level file based caching fixed the problem. Minor 0.015-0.020 delay from 1.1 but that is negligible.

It was Firefox default Google Ai that pointed the possible "caching" issue, in cross reference to our old topic:
https://www.elkarte.net/community/index.php?t/Problem-with-all-posts-timing-out---resolved-by-editing-Settings.php-2079

Also, just to note, I researched back and I found out that I didn't use gzip setup for quite sometimes, but I will definitely will study it back later.

My plan is to setup Redis and all out using it, for my project.
29
Bug Reports / Re: Slow Page Load time
Last post by Hj Ahmad Rasyid Hj Ismail -
Ok. I think the static files could be the issue too, and I will dig deeper on that.

Internally, mysql connections, they are both very fast:
time mysql -h 127.0.0.1 -u USER -p'PASS' -e "SELECT 1;"
Quotereal    0m0.068s
user    0m0.036s
sys     0m0.018s
time mysql -h localhost -u USER -p'PASS' -e "SELECT 1;"
Quotereal    0m0.066s
user    0m0.037s
sys     0m0.013s
30
Bug Reports / Re: Slow Page Load time
Last post by Spuds -
I was using curl to grab one of the hive css files and I did notice that nginx does not seem to be compressing the files, so check if your nginx.conf file has something like:
Code: [Copy]
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_vary on;
gzip_proxied any;
gzip_types
  text/css
  application/javascript
  text/javascript
  application/json
  image/svg+xml
  font/ttf
  application/vnd.ms-fontobject;
Just getting a static file from the server was slow and that has nothing to do with the ElkArte front end.  Some of that is also having a lot of network to traverse between me and you.

Other than that seeing 3-5 seconds on 17 queries maybe a slow connection to your db?  If the db server setting is a hostname that may cause a DNS lookup for each connection which would be slow.  You can try to measure it with:
Code: [Copy]
time mysql -h localhost -u USER -p'PASS' -e "SELECT 1;"
time mysql -h 127.0.0.1 -u USER -p'PASS' -e "SELECT 1;"

Can also check if the db is doing rDNS lookups, at least for MariaDb it should have skip-name-resolve in its conf file (assuming everything is on the same server)