David Yin's Blog https://www.yinfor.com/ Tech geek. Life geek. Mon, 19 Feb 2024 06:18:55 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.3 https://www.yinfor.com/wp-content/uploads/2016/09/cropped-icon-120x120.png David Yin's Blog https://www.yinfor.com/ 32 32 Upgrade Mastodon from 4.2.5 to 4.2.6 to 4.2.7 https://www.yinfor.com/2024/02/upgrade-mastodon-from-4-2-5-to-4-2-6-to-4-2-7.html https://www.yinfor.com/2024/02/upgrade-mastodon-from-4-2-5-to-4-2-6-to-4-2-7.html#respond Mon, 19 Feb 2024 06:18:55 +0000 https://www.yinfor.com/?p=9553 I just finished the upgrades of my Mastodon instance. I saw this notice a few days ago. I just have no time to do it. I flew to San Francisco...

The post Upgrade Mastodon from 4.2.5 to 4.2.6 to 4.2.7 appeared first on David Yin's Blog.

]]>
I just finished the upgrades of my Mastodon instance. I saw this notice a few days ago. I just have no time to do it. I flew to San Francisco last week. To look after my father-in-law. He received surgery yesterday and is in the ICU now.  I got very limited time to use the computer and have a rest.

I got a few hours to sit in front of my laptop tonight. The upgrade is two steps. One is from v4.2.5 to v4.2.6.

Mastodon v4.2.5

I enter the following commands to upgrade it. Firstly, SSH to the VPS.

sudo su - mastodon
cd live
git fetch --tags
git chckout v4.2.6
bundle install
yarn install --frozen-lockfiles
exit
sudo systemctl restart mastodon-sidekiq
sudo systemctl reload mastodon-web
sudo systemctl restart mastodon-streaming

Mastodon v4.2.6
The other one is an upgrade from v4.2.6 to v4.2.7.

sudo su - mastodon
cd live
git fetch --tags
git chckout v4.2.7
bundle install
yarn install --frozen-lockfiles
exit
sudo systemctl restart mastodon-sidekiq
sudo systemctl reload mastodon-web
sudo systemctl restart mastodon-streaming

Then, I restarted the VPS.

Mastodon v4.2.7

Why do I do the upgrades one by one?

I want to play safe. Since Mastodon does not provide a direct upgrade method. The best way to do the upgrade is one by one.

 

Since I am out of town, I may not publish regularly. Sorry about it.

The post Upgrade Mastodon from 4.2.5 to 4.2.6 to 4.2.7 appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/02/upgrade-mastodon-from-4-2-5-to-4-2-6-to-4-2-7.html/feed/ 0
Happy Spring Festival https://www.yinfor.com/2024/02/happy-spring-festival.html https://www.yinfor.com/2024/02/happy-spring-festival.html#respond Sun, 11 Feb 2024 00:29:14 +0000 https://www.yinfor.com/?p=9533 Our Spring Festival is one of the important holidays. We are Chinese, Asia, and Human Beings on Earth. Spring Festival is the traditional holiday. So, the feast is the key...

The post Happy Spring Festival appeared first on David Yin's Blog.

]]>
Our Spring Festival is one of the important holidays. We are Chinese, Asia, and Human Beings on Earth. Spring Festival is the traditional holiday. So, the feast is the key to it.

Let me post the dishes of our family.

Four Cold Dishes

糖醋黄瓜 Sweet and sour cucumber
糖醋黄瓜 Sweet and sour cucumber
四喜烤麸Braised Wheat Gluten
四喜烤麸 Braised Wheat Gluten
腊鸭Cured Duck
腊鸭 Cured Duck
糟鸡腿卷chicken leg rolls
糟鸡腿卷 chicken leg rolls

Six Hot Dishes

酒香鲈Seabass in Wine
酒香鲈 Seabass in Wine
水笋烧肉Braised Pork with Bamboo Shoots
水笋烧肉 Braised Pork with Bamboo Shoots
虾仁豆腐Shrimp and Tofu
虾仁豆腐 Shrimp and Tofu
豆苗Bean sprouts
豆苗 Bean sprouts
如意菜Ruyi dish
如意菜 Ruyi dish
香干芹菜Stir-fried celery with dried Tofu
香干芹菜 Stir-fried celery with dried Tofu

Soup

黄芽菜干贝火腿海参花菇蛋饺鱼丸肉丸鸡汤Napa, Dried Scallops, Ham, Sea Cucumber, Mushroom, Egg Dumpling, Fish Ball, Meatball, Chicken Soup
黄芽菜干贝火腿海参花菇蛋饺鱼丸肉丸鸡汤 Napa, Dried Scallops, Ham, Sea Cucumber, Mushroom, Egg Dumpling, Fish Ball, Meatball, Chicken Soup

 

Dessert

桂花酒酿小汤圆Sugar Osmanthus,Mini Rice Balls with Sweet Rice Wine
桂花酒酿小汤圆 Sugar Osmanthus, Mini Rice Balls with Sweet Rice Wine

Let me say it to everyone who is reading this post:

Happy New Spring 2024

The post Happy Spring Festival appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/02/happy-spring-festival.html/feed/ 0
Image format AVIF and WebP https://www.yinfor.com/2024/02/image-format-avif-and-webp.html https://www.yinfor.com/2024/02/image-format-avif-and-webp.html#respond Fri, 09 Feb 2024 18:00:21 +0000 https://www.yinfor.com/?p=9520 I just knew there was a new image format, AVIF, when I saved a picture from the Homedepot website. I did a very brief research and found it is a...

The post Image format AVIF and WebP appeared first on David Yin's Blog.

]]>
I just knew there was a new image format, AVIF, when I saved a picture from the Homedepot website.

I did a very brief research and found it is a format based on the AV1 video format. The AVIF generally has better compression than WebP, JPEF, PNGand GIF. It is designed to supersede them. AVIF competes with JPEFXL which has similar compression quality and is generally seen as more feature-rich than AVIF.

When I look at a new image format, I check the browser compatibility or support before implementing it.

 

I am using the Squoosh APP to compress a picture.

Three files. JPG, webp, and avif.  The original file is JPG file.

  • JPG file is 315KB
  • webp file is 230KB
  • avif file is 145KB

The compress configuration:

  • MozJPEG: Quality 75
  • WebP: Quality 75, Effort 4
  • AVIF: Quality 50, Effort 4:2:0

I opened the three images and zoomed to 313%. I can not tell the difference.

AVIF format has the smallest file size when having similar details. It is even better than WEBP.

To save the storage space, it is time to consider adding the support of AVIF files.  Some problems are blocking the usage of AVIF.

Firstly, about 89% of Internet users are using browsers that can show AVIF images properly. (Based on the data of Can I Use, Feb. 2024)  So, more than 10% can not see the AVIF pictures. It is not acceptable.

Secondly, WordPress does not support it by default. You have to get a plugin to support it.

Thirdly, Adobe Photoshop does not support it by default. Even the latest version. I am using Photoshop 20. It does not support WEBP either. Plugins are required to make it work.

The Plugins I am using on Photoshop cc 20.0.0.

AVIF plugin for Photoshop: avif-format

I download the AvifFormat_x64.zip. Uncompress it and put the Av1Image.8bi file into the location \Program Files\Common Files\Adobe\Plug-Ins\CC

WEBP plugin for Photoshop: WebPShop

I download the WEbPShop_0_4_3_Win_x64.8bi file into the location \Program Files\Common Files\Adobe\Plug-Ins\CC

 

With the above two plugins, I can make images and save them to WebP or AVIF format.

 

 

 

 

The post Image format AVIF and WebP appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/02/image-format-avif-and-webp.html/feed/ 0
Why I chose SPC flooring? https://www.yinfor.com/2024/02/why-i-chose-spc-flooring.html https://www.yinfor.com/2024/02/why-i-chose-spc-flooring.html#respond Thu, 08 Feb 2024 20:07:26 +0000 https://www.yinfor.com/?p=9515 Here I like to share my thoughts on SPC Flooring. And Why I chose it. SPC: High durability, water-proof, excellent for high-traffic areas, dent-resistant Laminate: Versatile designs, reacts to heat...

The post Why I chose SPC flooring? appeared first on David Yin's Blog.

]]>
Here I like to share my thoughts on SPC Flooring. And Why I chose it.

  • SPC: High durability, water-proof, excellent for high-traffic areas, dent-resistant
  • Laminate: Versatile designs, reacts to heat and cold, requires waterproofing for high-moisture areas

The SPC plant looks similar to the Laminate plank. SPC is also called Regid Vinyl plank.

Comparison of Durability and Resistance

SPC flooring is highly durable and resistant thanks to its multiple layers, including an ultraviolet coating, a wear layer, an SPC print layer, a core, and a balanced layer. This construction makes it resistant to dents and UV, ensuring it won’t fade easily. It’s also water-resistant, making it a solid choice for high-traffic areas and rooms with high moisture levels.

On the other hand, laminate flooring, typically made from wood composite, pulp, and paper layers, is sensitive to heat and cold, which can cause changes. However, it’s possible to get waterproof laminate to withstand high-moisture areas.

 

Comparison of Installation and Maintenance

All three types of flooring are relatively easy to install and maintain. SPC and LVT flooring, for instance, use a floating click lock, tongue, and groove system that is DIY-friendly. On the other hand, laminate flooring can be installed professionally for the best results.

In terms of maintenance, all three types of floors are easy to clean and do not require professional cleaning treatments. However, it’s crucial to check your warranty to ensure you use the right materials and methods.

Maybe, for myself, SPC is more easy to cut and install.

Comparison of Cost and Value for Money

Laminate Flooring

The price of cheap and low-quality laminate flooring can be as low as $1 per square foot. However high-end laminate flooring can be up to $5 per square foot or more. Medium-range laminate flooring will normally cost around $3 per square foot.
Even though laminate flooring is cheaper per square foot, here’s the kicker… Laminate flooring is actually more difficult to maintain compared to SPC flooring.

SPC Flooring

Again, depending on the type of SPC flooring you desire, traditional SPC flooring like sheet SPC can cost as low as $0.50 per foot square. On average, medium-ranged SPC flooring is about $2.50 per square foot.
When it comes to top-end SPC floorings like luxury SPC plank (LVP) or luxury SPC tile (LVT), prices can be a lot higher ranging from $5 to $8 per square foot.

The one I bought for my basement is $2.7/sqft (regular price) at Costco.  I got $2.11/sqft with a discount.

Core Material

Both SPC and Laminate flooring consist of 4 layers which are the backing layer, core, printed design layer, and the top with wear layer. The differences are the material used for each layer, especially the core material.

The core material of the SPC plank is the SPC Composite Core.

The core material of Laminate plank is fiberboard, it can be MDF or HDF.

Thickness

The main difference is the thickness of them. SPC is 6mm or 7mm normally. The laminate can be 15mm. Both include a 1.5mm to 2mm foam backer.

Environment

When choosing laminate flooring, you need to think about the harmful odors (formaldehyde) emitted from the core, or MDF, HDF. The standard is CARB2, TSCA, E1 etc.

USA, Canada Standard: CARB Phase 2 Compliant, TSCA Compliant, EPA.org.

Europe Standard: E1 Certificate, Mandatory E1 Standard.

No matter how good the laminate products are, there is still some formaldehyde inside of the cord material.

Laminate floor

 

SPC plank has no this kind of worry.

My Consideration.

It is installed in the basement. I don’t need to worry about the noise.

I have to install it by myself. It should be good for DIY.

It should be waterproof. It can be installed directly over concrete,

There is a bedroom. So it is best formaldehyde-free.

So I decided to buy SPC flooring.

I checked Home Depot, Rona, Costco, etc. Costco has very limited options but has the best price. Especially when it is at a discount.

 

 

The post Why I chose SPC flooring? appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/02/why-i-chose-spc-flooring.html/feed/ 0
Replace the carpet with SPC flooring https://www.yinfor.com/2024/02/replace-the-carpet-with-spc-flooring.html https://www.yinfor.com/2024/02/replace-the-carpet-with-spc-flooring.html#respond Wed, 07 Feb 2024 20:19:54 +0000 https://www.yinfor.com/?p=9495 My basement was covered by carpet. It is old and kind of dirty. I didn’t like it. So when I think about the renovation of the the basement, I change...

The post Replace the carpet with SPC flooring appeared first on David Yin's Blog.

]]>
My basement was covered by carpet. It is old and kind of dirty. I didn’t like it. So when I think about the renovation of the the basement, I change it to SPC flooring. It is the main part of the project.

The first step, get the measurement of the basement and calculate how much SPC plank I need.

The software I used for CAD drawing is LibreCAD. It is open source and free. It is just a 2D CAD software.

I am using the stupid way. I drew the floor plan, I drew an SPC plank.  I copied and pasted them to cover the whole basement. Manually counted the total number of the planks. Then bought 28 boxes of Versaclic Vinyl flooring Sedona Grey OAK SPC.

I am not discussing why I chose SPC plank, not the laminate or vinyl.  I just chose it and after one year. I still like it.

I bought it at the COSTCO warehouse.

I need to go two rounds to get them home.

The Second step is to remove the old carpet.

I am using the following tools.

  • Utility Knife
  • Pliers
  • Gloves.
  • Black garbage bags.

This job is simple, just need your muscles. With gloves, I can grab the carpet tightly.  Use a utility knife to cut the carpet into small pieces. Put them into the garbage bag.  There is underlayment under the carpet. It also needs to be removed. I did not take pictures for this job. So I get some from the Internet for sharing.

The Third step is to remove the tack strip and clean the concrete floor.

The basement is concrete. Along the walls, Tack Strips need to be removed. Most of them are wood. Some are metal.

Tools I need:

  • Crowbar, or Prybar
  • Hamer
  • Safety glasses
  • Gloves

 

After removal. There are small holes in the ground and some places are not clean.  Bought a bottle of Ready Mix Concrete Patch.

Patch the ground and clean the stains.  To prepare the floor.

The Fourth step is to add a vapor barrier.

It is a vapor barrier, or you can call it a moisture barrier.  I bought a bag of 6mil Everbilt CGSB-approved Vapour Barrier and a roll of Tuck Tape.

The concrete floor has hairline cracking normally. The moisture may have a chance to come out. So adding a Vapor barrier is a MUST.

The basement are full of the stuffs. I have to start from a corner. Do the flooring part to part. The above steps are also done one corner to another corner. Here is a picture when I just finished the first corner.

Flooring

The Fifth step is to install the SPC flooring

Installing the SPC flooring is the easiest part.

  • To cut it, use a utility knife.
  • Give a space for expansion to the wall.
  • Try to mix the planks without making a pattern.
  • Start from the Upper Left corner
  • Got a rubber floor mallet.
  • A square, or ruler

VersaClick has a video guide to show you how to install their products.

After finishing all the above steps, install the baseboard. The bookshelf division and the box cover the pipes are done before the flooring.

 

The post Replace the carpet with SPC flooring appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/02/replace-the-carpet-with-spc-flooring.html/feed/ 0
Build a box to cover the pipes of the furnace https://www.yinfor.com/2024/02/build-a-box-to-cover-the-pipes-of-the-furnace.html https://www.yinfor.com/2024/02/build-a-box-to-cover-the-pipes-of-the-furnace.html#respond Tue, 06 Feb 2024 23:50:03 +0000 https://www.yinfor.com/?p=9482 My house got a new furnace in 2002 spring. It is a high-efficiency furnace, which requires individual venting pipes. One is for combustion air, the other one is for exhaust...

The post Build a box to cover the pipes of the furnace appeared first on David Yin's Blog.

]]>
My house got a new furnace in 2002 spring. It is a high-efficiency furnace, which requires individual venting pipes. One is for combustion air, the other one is for exhaust air. The combustion air pipe brings air into the furnace and mixes it with fuel, allowing the fuel to burn. The exhaust pipe vents combustion gases to the outdoors. My old furnace is a traditional one.  After installation, there are two additional pipes in my basement across the room.

When I did the renovation of the basement, I moved two existing IKEA BILLY bookshelves under the pipes. and built a box to cover the pipes.

I used 2by4 lumber to make the frame of the box. Then covered by a plywood sheet.

I am not very confident with the chain, which is hanging the pipes. So I add blocks to support them.

The space behind the bookshelf is used as a bedroom.

From the picture, you may notice that the pipes are not exactly above the bookshelf. So I used the space as a storage

 

I put a small bookcase between the two BILLY bookshelves. It is facing the other way. So it can be accessed from the bedroom.

I attached a plywood sheet to the back of the bookshelves. Then painted it.

These pictures were taken when I did the renovation. Here are some pictures I took just a few minutes ago.

These are part of the basement renovation. I will post more about the whole project.

The post Build a box to cover the pipes of the furnace appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/02/build-a-box-to-cover-the-pipes-of-the-furnace.html/feed/ 0
January Report of my Blog https://www.yinfor.com/2024/02/january-report-of-my-blog.html https://www.yinfor.com/2024/02/january-report-of-my-blog.html#respond Tue, 06 Feb 2024 00:10:17 +0000 https://www.yinfor.com/?p=9475 Here I like to publish several reports from different sources.  All the reports are based on the data from Jan. 1 to Jan. 31. Google Analytics I started to collect...

The post January Report of my Blog appeared first on David Yin's Blog.

]]>
Here I like to publish several reports from different sources.  All the reports are based on the data from Jan. 1 to Jan. 31.

Google Analytics

I started to collect data in Google Analytics on Jan 7. So it is not a completed month.

The Top Five Country:

  1. USA
  2. Russia
  3. Canada
  4. China
  5. Germany

See browsers and devices.

Most users are using desktops. Google Chrome has more users than others.

About the new users, 2.3K users are from organic search out of a total of 2.7k new users. It means the SEO is OK on my blog.

Awstats

See the visits, pages, and hits report first.

There is a part introducing the connection to the world.

Google.com is the biggest player in the Search service providers.

 

 

The post January Report of my Blog appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/02/january-report-of-my-blog.html/feed/ 0
Critical security Update of my Mastodon instance to v4.2.5 https://www.yinfor.com/2024/02/critical-security-update-of-my-mastodon-instance-to-v4-2-5.html https://www.yinfor.com/2024/02/critical-security-update-of-my-mastodon-instance-to-v4-2-5.html#respond Fri, 02 Feb 2024 18:43:43 +0000 https://www.yinfor.com/?p=9469 It is just a week since I upgraded my Mastodon from 4.2.3 to v4.2.4. Today, I saw this critical update notice when I checked the Maston instance this morning. So,...

The post Critical security Update of my Mastodon instance to v4.2.5 appeared first on David Yin's Blog.

]]>
It is just a week since I upgraded my Mastodon from 4.2.3 to v4.2.4. Today, I saw this critical update notice when I checked the Maston instance this morning.

So, I went to the official release v4.2.5 notes to see what exactly happened on it.

⚠️ This release is an important security release fixing a critical security issue (CVE-2024-23832).

Corresponding security releases are available for the 4.1.x branch, the 4.0.x branch and the 3.5.x branch.

If you are using nightly builds, do not use this release but update to nightly.2024-02-02-security or newer instead. If you are on the main branch, update to the latest commit.

Yes, it is very important. I should upgrade it immediately.
SSH to the server. Run the following command:

sudo su -mastodon
cd live
git fetch --tags
git checkout v4.2.5
bundle install
yarn install --frozen-lockfile
exit
sudo systemctl restart mastodon-sidekiq
sudo systemctl reload mastodon-web
sudo systemctl restart mastodon-streaming

Now, it is OK.

The post Critical security Update of my Mastodon instance to v4.2.5 appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/02/critical-security-update-of-my-mastodon-instance-to-v4-2-5.html/feed/ 0
The Top Five of my Blog https://www.yinfor.com/2024/01/the-top-five-of-my-blog.html https://www.yinfor.com/2024/01/the-top-five-of-my-blog.html#respond Mon, 29 Jan 2024 16:07:00 +0000 https://www.yinfor.com/?p=9463 I checked my Blog in Google Search Console. It has a few useful reports. Such as Top Queries, Top pages, etc. First, Top Queries on Google Search. The four of...

The post The Top Five of my Blog appeared first on David Yin's Blog.

]]>
I checked my Blog in Google Search Console. It has a few useful reports. Such as Top Queries, Top pages, etc.

First, Top Queries on Google Search.

The four of five queries are all related to Proxmox VE. I want to share how my VMs are running and what I learned from hosting the Proxmox VE on the home server.

A lot of friends want to have their VM auto-start. It means the VM starts with the Host, Proxmox VE. They just simply do a Google search and find my quick answer, How to enable the VM auto-boot in Proxmox VE.

The CPU type is also very important when creating a new VM. There are so many choices of CPU types. Which one is the right one? Which one is good for the HOST CPU? Which one is a perfect match for the guest OS?

My post, How I choose VM CPU type in Proxmox VE gives you the answer.

The Win32diskimager issue on Windows 10 has bothered people a lot of time, just like me, I spent hours to locate the problem and get my workaround. I am hesitant to say it is a solution.

Can not start Win32diskimager on Windows 10.

There are also some helpful posts I made in past years.

I was very happy when my post gave you help or a clue to solve the problem. So I also welcome your comments here.

 

The post The Top Five of my Blog appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/01/the-top-five-of-my-blog.html/feed/ 0
Upgrade Mastodon v4.2.3 to v4.2.4 https://www.yinfor.com/2024/01/upgrade-mastodon-v4-2-3-to-v4-2-4.html https://www.yinfor.com/2024/01/upgrade-mastodon-v4-2-3-to-v4-2-4.html#respond Sat, 27 Jan 2024 22:45:23 +0000 https://www.yinfor.com/?p=9449 Today I upgraded my Mastodon server from v4.2.3 to v4.2.4. When I signed in to my account, and went to the Administration, Dashboard, I saw the update notification. So I...

The post Upgrade Mastodon v4.2.3 to v4.2.4 appeared first on David Yin's Blog.

]]>
Today I upgraded my Mastodon server from v4.2.3 to v4.2.4.

When I signed in to my account, and went to the Administration, Dashboard, I saw the update notification.

So I know I need to update my Mastodon Instance for safe.
I installed it on my VPS from source, not docker.

So here it is the Release notes. It is not just updating the source code of Mastodon itself, the dependencies also need to be updated. The release note is general. I have to do the following to update it.

mastodon@instance-20230911-1538:~/live$ git fetch --tags
remote: Enumerating objects: 3956, done.
remote: Counting objects: 100% (2647/2647), done.
remote: Compressing objects: 100% (112/112), done.
remote: Total 3956 (delta 2538), reused 2628 (delta 2535), pack-reused 1309
Receiving objects: 100% (3956/3956), 5.34 MiB | 10.70 MiB/s, done.
Resolving deltas: 100% (2908/2908), completed with 848 local objects.
From https://github.com/mastodon/mastodon
* [new branch] feature-color-scheme -> origin/feature-color-scheme
* [new branch] feature-follow-suggestions-carousel -> origin/feature-follow-suggestions-carousel
+ 9227a4eba...cfb90dc73 feature-redirect -> origin/feature-redirect (forced update)
+ 44067ac31...73be7e19e features/severed-relationships -> origin/features/severed-relationships (forced update)
* [new branch] gh-readonly-queue/main/pr-28322-881e8c113c4da503e73a953c8430f71f380cff63 -> origin/gh-readonly-queue/main/pr-28322-881e8c113c4da503e73a953c8430f71f380cff63
* [new branch] gh-readonly-queue/main/pr-28626-1ad908e0c08c236389967d86b4f238f428de9fef -> origin/gh-readonly-queue/main/pr-28626-1ad908e0c08c236389967d86b4f238f428de9fef
+ d7754f710...497399485 i18n/crowdin/translations -> origin/i18n/crowdin/translations (forced update)
a2624ff73..881e8c113 main -> origin/main
* [new branch] renovate/axios-1.x-lockfile -> origin/renovate/axios-1.x-lockfile
+ 6f82ed0f2...71e41e3c8 renovate/babel-monorepo -> origin/renovate/babel-monorepo (forced update)
* [new branch] renovate/formatjs-monorepo -> origin/renovate/formatjs-monorepo
* [new branch] renovate/husky-9.x -> origin/renovate/husky-9.x
* [new branch] renovate/reduxjs-toolkit-2.x-lockfile -> origin/renovate/reduxjs-toolkit-2.x-lockfile
* [new branch] renovate/ruby-3.x -> origin/renovate/ruby-3.x
+ 9ade00bd6...5e62aa802 renovate/stoplight-4.x -> origin/renovate/stoplight-4.x (forced update)
* [new branch] revert/follow-back-mutual -> origin/revert/follow-back-mutual
2e4d43933..fc4e2eca9 stable-4.1 -> origin/stable-4.1
d7875adad..4633bb8ce stable-4.2 -> origin/stable-4.2
* [new tag] v4.1.12 -> v4.1.12
* [new tag] v4.2.4 -> v4.2.4
mastodon@instance-20230911-1538:~/live$ git checkout v4.2.4
Previous HEAD position was 90371a4fc Bump version to v4.2.3
HEAD is now at 4633bb8ce Bump version to v4.2.4
mastodon@instance-20230911-1538:~/live$ cd ..

 

 

mastodon@instance-20230911-1538:~$ git -C "$(rbenv root)"/plugins/ruby-build pull
remote: Enumerating objects: 153, done.
remote: Counting objects: 100% (153/153), done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 153 (delta 78), reused 148 (delta 77), pack-reused 0
Receiving objects: 100% (153/153), 78.95 KiB | 908.00 KiB/s, done.
Resolving deltas: 100% (78/78), completed with 4 local objects.
From https://github.com/rbenv/ruby-build
d312f5a..e1b36a3 master -> origin/master
* [new tag] v20240119 -> v20240119
* [new tag] v20231211 -> v20231211
* [new tag] v20231225 -> v20231225
* [new tag] v20240116 -> v20240116
Updating d312f5a..e1b36a3
Fast-forward
.github/workflows/ci.yml | 2 +-
README.md | 2 +-
bin/ruby-build | 108 +++++++-------
script/update-cruby | 2 +-
share/man/man1/ruby-build.1 | 4 +-
share/ruby-build/2.0.0-dev | 2 +-
share/ruby-build/2.0.0-p0 | 2 +-
share/ruby-build/2.0.0-p195 | 2 +-
share/ruby-build/2.0.0-p247 | 2 +-
share/ruby-build/2.0.0-p353 | 2 +-
share/ruby-build/2.0.0-p451 | 2 +-
share/ruby-build/2.0.0-p481 | 2 +-
share/ruby-build/2.0.0-p576 | 2 +-
share/ruby-build/2.0.0-p594 | 2 +-
share/ruby-build/2.0.0-p598 | 2 +-
share/ruby-build/2.0.0-p643 | 2 +-
share/ruby-build/2.0.0-p645 | 2 +-
share/ruby-build/2.0.0-p647 | 2 +-
share/ruby-build/2.0.0-p648 | 2 +-
share/ruby-build/2.0.0-preview1 | 2 +-
share/ruby-build/2.0.0-preview2 | 2 +-
share/ruby-build/2.0.0-rc1 | 2 +-
share/ruby-build/2.0.0-rc2 | 2 +-
share/ruby-build/2.1.0 | 2 +-
share/ruby-build/2.1.0-dev | 2 +-
share/ruby-build/2.1.0-preview1 | 2 +-
share/ruby-build/2.1.0-preview2 | 2 +-
share/ruby-build/2.1.0-rc1 | 2 +-
share/ruby-build/2.1.1 | 2 +-
share/ruby-build/2.1.10 | 2 +-
share/ruby-build/2.1.2 | 2 +-
share/ruby-build/2.1.3 | 2 +-
share/ruby-build/2.1.4 | 2 +-
share/ruby-build/2.1.5 | 2 +-
share/ruby-build/2.1.6 | 2 +-
share/ruby-build/2.1.7 | 2 +-
share/ruby-build/2.1.8 | 2 +-
share/ruby-build/2.1.9 | 2 +-
share/ruby-build/2.2.0 | 2 +-
share/ruby-build/2.2.0-dev | 2 +-
share/ruby-build/2.2.0-preview1 | 2 +-
share/ruby-build/2.2.0-preview2 | 2 +-
share/ruby-build/2.2.0-rc1 | 2 +-
share/ruby-build/2.2.1 | 2 +-
share/ruby-build/2.2.10 | 2 +-
share/ruby-build/2.2.2 | 2 +-
share/ruby-build/2.2.3 | 2 +-
share/ruby-build/2.2.4 | 2 +-
share/ruby-build/2.2.5 | 2 +-
share/ruby-build/2.2.6 | 2 +-
share/ruby-build/2.2.7 | 2 +-
share/ruby-build/2.2.8 | 2 +-
share/ruby-build/2.2.9 | 2 +-
share/ruby-build/2.3.0 | 2 +-
share/ruby-build/2.3.0-dev | 2 +-
share/ruby-build/2.3.0-preview1 | 2 +-
share/ruby-build/2.3.0-preview2 | 2 +-
share/ruby-build/2.3.1 | 2 +-
share/ruby-build/2.3.2 | 2 +-
share/ruby-build/2.3.3 | 2 +-
share/ruby-build/2.3.4 | 2 +-
share/ruby-build/2.3.5 | 2 +-
share/ruby-build/2.3.6 | 2 +-
share/ruby-build/2.3.7 | 2 +-
share/ruby-build/2.3.8 | 2 +-
share/ruby-build/2.4.0 | 2 +-
share/ruby-build/2.4.0-dev | 2 +-
share/ruby-build/2.4.0-preview1 | 2 +-
share/ruby-build/2.4.0-preview2 | 2 +-
share/ruby-build/2.4.0-preview3 | 2 +-
share/ruby-build/2.4.0-rc1 | 2 +-
share/ruby-build/2.4.1 | 2 +-
share/ruby-build/2.4.10 | 2 +-
share/ruby-build/2.4.2 | 2 +-
share/ruby-build/2.4.3 | 2 +-
share/ruby-build/2.4.4 | 2 +-
share/ruby-build/2.4.5 | 2 +-
share/ruby-build/2.4.6 | 2 +-
share/ruby-build/2.4.7 | 2 +-
share/ruby-build/2.4.8 | 2 +-
share/ruby-build/2.4.9 | 2 +-
share/ruby-build/2.5.0 | 2 +-
share/ruby-build/2.5.0-dev | 2 +-
share/ruby-build/2.5.0-preview1 | 2 +-
share/ruby-build/2.5.0-rc1 | 2 +-
share/ruby-build/2.5.1 | 2 +-
share/ruby-build/2.5.2 | 2 +-
share/ruby-build/2.5.3 | 2 +-
share/ruby-build/2.5.4 | 2 +-
share/ruby-build/2.5.5 | 2 +-
share/ruby-build/2.5.6 | 2 +-
share/ruby-build/2.5.7 | 2 +-
share/ruby-build/2.5.8 | 2 +-
share/ruby-build/2.5.9 | 2 +-
share/ruby-build/2.6.0 | 2 +-
share/ruby-build/2.6.0-dev | 2 +-
share/ruby-build/2.6.0-preview1 | 2 +-
share/ruby-build/2.6.0-preview2 | 2 +-
share/ruby-build/2.6.0-preview3 | 2 +-
share/ruby-build/2.6.0-rc1 | 2 +-
share/ruby-build/2.6.0-rc2 | 2 +-
share/ruby-build/2.6.1 | 2 +-
share/ruby-build/2.6.10 | 2 +-
share/ruby-build/2.6.2 | 2 +-
share/ruby-build/2.6.3 | 2 +-
share/ruby-build/2.6.4 | 2 +-
share/ruby-build/2.6.5 | 2 +-
share/ruby-build/2.6.6 | 2 +-
share/ruby-build/2.6.7 | 2 +-
share/ruby-build/2.6.8 | 2 +-
share/ruby-build/2.6.9 | 2 +-
share/ruby-build/2.7.0 | 2 +-
share/ruby-build/2.7.0-dev | 2 +-
share/ruby-build/2.7.0-preview1 | 2 +-
share/ruby-build/2.7.0-preview2 | 2 +-
share/ruby-build/2.7.0-preview3 | 2 +-
share/ruby-build/2.7.0-rc1 | 2 +-
share/ruby-build/2.7.0-rc2 | 2 +-
share/ruby-build/2.7.1 | 2 +-
share/ruby-build/2.7.2 | 2 +-
share/ruby-build/2.7.3 | 2 +-
share/ruby-build/2.7.4 | 2 +-
share/ruby-build/2.7.5 | 2 +-
share/ruby-build/2.7.6 | 2 +-
share/ruby-build/2.7.7 | 2 +-
share/ruby-build/2.7.8 | 2 +-
share/ruby-build/3.0.0 | 2 +-
share/ruby-build/3.0.0-dev | 2 +-
share/ruby-build/3.0.0-preview1 | 2 +-
share/ruby-build/3.0.0-preview2 | 2 +-
share/ruby-build/3.0.0-rc1 | 2 +-
share/ruby-build/3.0.1 | 2 +-
share/ruby-build/3.0.2 | 2 +-
share/ruby-build/3.0.3 | 2 +-
share/ruby-build/3.0.4 | 2 +-
share/ruby-build/3.0.5 | 2 +-
share/ruby-build/3.0.6 | 2 +-
share/ruby-build/3.1.0 | 2 +-
share/ruby-build/3.1.0-dev | 2 +-
share/ruby-build/3.1.0-preview1 | 2 +-
share/ruby-build/3.1.1 | 2 +-
share/ruby-build/3.1.2 | 2 +-
share/ruby-build/3.1.3 | 2 +-
share/ruby-build/3.1.4 | 2 +-
share/ruby-build/3.2.0 | 2 +-
share/ruby-build/3.2.0-dev | 2 +-
share/ruby-build/3.2.0-preview1 | 2 +-
share/ruby-build/3.2.0-preview2 | 2 +-
share/ruby-build/3.2.0-preview3 | 2 +-
share/ruby-build/3.2.0-rc1 | 2 +-
share/ruby-build/3.2.1 | 2 +-
share/ruby-build/3.2.2 | 2 +-
share/ruby-build/3.2.3 | 2 +
share/ruby-build/3.3.0 | 2 +
share/ruby-build/3.3.0-dev | 2 +-
share/ruby-build/3.3.0-preview1 | 2 +-
share/ruby-build/3.3.0-preview2 | 2 +-
share/ruby-build/3.3.0-preview3 | 2 +-
share/ruby-build/3.3.0-rc1 | 2 +
share/ruby-build/3.4-dev | 2 +
share/ruby-build/ruby-dev | 2 +
share/ruby-build/truffleruby+graalvm-23.1.2 | 19 +++
share/ruby-build/truffleruby-23.1.2 | 19 +++
test/build.bats | 223 ++++++++++++++++++++--------
test/compiler.bats | 4 +-
test/fixtures/definitions/needs-yaml | 2 +-
test/fixtures/definitions/vanilla-ruby | 1 -
test/fixtures/ruby-2.0.0.tar.gz | Bin 222 -> 0 bytes
test/fixtures/ruby-3.2.0.tar.gz | Bin 0 -> 246 bytes
169 files changed, 417 insertions(+), 281 deletions(-)
create mode 100644 share/ruby-build/3.2.3
create mode 100644 share/ruby-build/3.3.0
create mode 100644 share/ruby-build/3.3.0-rc1
create mode 100644 share/ruby-build/3.4-dev
create mode 100644 share/ruby-build/ruby-dev
create mode 100644 share/ruby-build/truffleruby+graalvm-23.1.2
create mode 100644 share/ruby-build/truffleruby-23.1.2
delete mode 100644 test/fixtures/definitions/vanilla-ruby
delete mode 100644 test/fixtures/ruby-2.0.0.tar.gz
create mode 100644 test/fixtures/ruby-3.2.0.tar.gz
mastodon@instance-20230911-1538:~$ cd live
mastodon@instance-20230911-1538:~/live$ RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install
==> Downloading ruby-3.2.3.tar.gz...
-> curl -q -fL -o ruby-3.2.3.tar.gz https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.3.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 19.6M 100 19.6M 0 0 12.8M 0 0:00:01 0:00:01 --:--:-- 12.8M
==> Installing ruby-3.2.3...
-> ./configure "--prefix=$HOME/.rbenv/versions/3.2.3" --enable-shared --with-ext=openssl,psych,+ --with-jemalloc
-> make -j 4
-> make install
==> Installed ruby-3.2.3 to /home/mastodon/.rbenv/versions/3.2.3
mastodon@instance-20230911-1538:~/live$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Using rake 13.0.6
Using erubi 1.12.0
Using concurrent-ruby 1.2.2
Using minitest 5.19.0
Using builder 3.2.4
Using racc 1.7.1
Using crass 1.0.6
Using rack 2.2.8
Using websocket-extensions 0.1.5
Using date 3.3.3
Using marcel 1.0.2
Using mini_mime 1.1.5
Fetching nio4r 2.7.0
Using timeout 0.4.0
Using aes_key_wrap 1.1.0
Using public_suffix 5.0.3
Using encryptor 3.0.0
Using jsonapi-renderer 0.2.2
Using attr_required 1.0.1
Using aws-eventstream 1.2.0
Using aws-partitions 1.809.0
Using awrence 1.2.1
Using android_key_attestation 0.3.0
Using jmespath 1.6.2
Using faraday-em_http 1.0.0
Using faraday-em_synchrony 1.0.0
Using faraday-excon 1.1.0
Using faraday-httpclient 1.0.1
Using faraday-net_http 1.0.1
Using multipart-post 2.3.0
Using faraday-net_http_persistent 1.2.0
Using faraday-patron 1.0.0
Using ruby2_keywords 0.0.5
Using faraday-retry 1.0.3
Using faraday-rack 1.0.0
Using connection_pool 2.4.1
Using bcp47_spec 0.2.1
Using bcrypt 3.1.18
Using bindata 2.4.15
Using browser 5.3.1
Using msgpack 1.7.1
Using bundler 2.4.13
Using redis 4.8.1
Using blurhash 0.1.7
Using cbor 0.5.9.6
Using charlock_holmes 0.7.7
Using multi_json 1.15.0
Using chunky_png 1.4.0
Using elasticsearch-dsl 0.1.10
Using cocoon 1.2.15
Using openssl 3.1.0
Using climate_control 0.2.0
Using color_diff 0.1
Using orm_adapter 0.5.0
Using thor 1.2.2
Using method_source 1.0.0
Using unf_ext 0.0.8.2
Using zeitwerk 2.6.11
Using dotenv 2.8.1
Using rotp 6.2.2
Using excon 0.100.0
Using fastimage 2.2.7
Using ffi 1.15.5
Using formatador 0.3.0
Using fast_blank 1.0.1
Using ipaddress 0.8.3
Using raabro 1.4.0
Using mime-types-data 3.2023.0808
Using temple 0.10.2
Using ed25519 1.3.0
Using json 2.6.3
Using hashie 5.0.0
Using hiredis 0.6.3
Using htmlentities 4.3.4
Using http-form_data 2.3.0
Using hkdf 0.3.0
Using http_accept_language 2.1.1
Using tilt 2.2.0
Using idn-ruby 0.1.5
Using httpclient 2.8.3
Using rainbow 3.1.1
Using json-canonicalization 1.0.0
Using link_header 0.0.8
Using kaminari-core 1.2.2
Using jwt 2.7.1
Using net-ldap 0.18.0
Using uri 0.12.2
Using statsd-ruby 1.5.0
Using ox 2.14.17
Using rexml 3.2.6
Using oj 3.16.1
Using parslet 2.0.0
Using pg 1.5.4
Using posix-spawn 0.3.15
Using tty-color 0.6.0
Using private_address_check 0.5.0
Using redcarpet 3.6.0
Using rqrcode_core 1.2.0
Using ruby-progressbar 1.13.0
Using semantic_range 3.0.0
Using rubyzip 2.3.2
Using tty-cursor 0.7.1
Using xorcist 1.1.3
Using tty-screen 0.8.1
Using wisper 2.0.1
Using nokogiri 1.15.4 (aarch64-linux)
Using rack-test 2.1.0
Using i18n 1.14.1
Using tzinfo 2.0.6
Using warden 1.2.9
Using request_store 1.5.1
Using rack-cors 2.0.1
Using rack-attack 6.7.0
Using rack-protection 3.0.5
Using rack-proxy 0.7.6
Using net-protocol 0.2.1
Using websocket-driver 0.7.6
Using sprockets 3.7.2
Using addressable 2.8.5
Using attr_encrypted 4.0.0
Using aws-sigv4 1.6.0
Using bootsnap 1.16.0
Using net-http-persistent 4.0.2
Using mario-redis-lock 1.2.1
Using brpoplpush-redis_script 0.1.3
Using redis-namespace 1.11.0
Using redlock 1.3.2
Using faraday-multipart 1.0.4
Using openssl-signature_algorithm 1.3.0
Using elasticsearch-api 7.13.3
Using terrapin 0.6.0
Using sidekiq 6.5.10
Using unf 0.1.4
Using ffi-compiler 1.0.1
Using mime-types 3.5.1
Using haml 6.1.2
Using httplog 1.6.2
Using rdf 3.3.1
Using webpush 0.3.8 from https://github.com/ClearlyClaire/webpush.git (at f14a4d5@f14a4d5)
Using safety_net_attestation 0.4.0
Fetching net-http 0.3.2
Using hcaptcha 7.1.0
Using pastel 0.8.0
Using rqrcode 2.2.0
Using loofah 2.21.3
Using sanitize 6.0.2
Using ruby-saml 1.15.0
Using tty-reader 0.9.0
Using activesupport 7.0.8
Using et-orbi 1.2.7
Using tzinfo-data 1.2023.3
Using net-imap 0.3.7
Using omniauth 2.1.1
Using net-smtp 0.3.3
Using css_parser 1.14.0
Using aws-sdk-core 3.181.0
Using net-pop 0.1.2
Using faraday 1.10.3
Using stoplight 3.0.2
Using cose 1.3.0
Using tpm-key_attestation 0.12.0
Using sidekiq-bulk 0.2.0
Using sidekiq-unique-jobs 7.1.29
Using twitter-text 3.1.0
Using domain_name 0.5.20190701
Using llhttp-ffi 0.4.0
Using fog-core 2.1.0
Using rdf-normalize 0.6.1
Using rails-html-sanitizer 1.6.0
Using tty-prompt 0.23.1
Using json-ld 3.3.1
Using rails-dom-testing 2.1.1
Using globalid 1.1.0
Using activemodel 7.0.8
Using json-jwt 1.15.3
Using nsa 0.2.8 from https://github.com/jhawthorn/nsa.git (at e020fcc@e020fcc)
Using case_transform 0.2
Using swd 1.3.0
Using webfinger 1.2.0
Using pundit 2.3.0
Using simple-navigation 4.4.0
Using omniauth-cas 2.0.0 from https://github.com/stanhu/omniauth-cas.git (at 4211e6d@4211e6d)
Using fugit 1.8.1
Using omniauth-saml 2.1.0
Using premailer 1.21.0
Using aws-sdk-kms 1.71.0
Using faraday_middleware 1.2.0
Using mail 2.8.1
Installing net-http 0.3.2
Using elasticsearch-transport 7.13.3
Using webauthn 3.0.0
Using http-cookie 1.0.5
Using fog-json 1.2.0
Using json-ld-preloaded 3.2.2
Using actionview 7.0.8
Installing nio4r 2.7.0 with native extensions
Using activerecord 7.0.8
Using kt-paperclip 7.2.1
Using rack-oauth2 1.21.3
Using activejob 7.0.8
Using validate_url 1.0.15
Using rufus-scheduler 3.9.1
Using aws-sdk-s3 1.133.0
Using azure-storage-common 2.0.4
Using validate_email 0.1.6
Using elasticsearch 7.13.3
Using http 5.1.1
Using fog-openstack 0.3.10
Using actionpack 7.0.8
Using kaminari-actionview 1.2.2
Using discard 1.2.1
Using kaminari-activerecord 1.2.2
Using pghero 3.3.4
Using strong_migrations 0.8.0
Using azure-storage-blob 2.0.3
Using sidekiq-scheduler 5.0.3
Using openid_connect 1.4.2
Using chewy 7.3.4
Using activestorage 7.0.8
Using actionmailer 7.0.8
Using railties 7.0.8
Using active_model_serializers 0.10.13
Using omniauth-rails_csrf_protection 1.0.1
Using simple_form 5.2.0
Using sprockets-rails 3.4.2
Using kaminari 1.2.2
Using md-paperclip-azure 2.2.0
Using omniauth_openid_connect 0.6.1
Using actionmailbox 7.0.8
Using actiontext 7.0.8
Using premailer-rails 1.12.0
Using responders 3.1.0
Using doorkeeper 5.6.6
Using dotenv-rails 2.8.1
Using haml-rails 2.1.0
Using lograge 0.13.0
Using rails-i18n 7.0.7
Using scenic 1.7.0
Using webpacker 5.4.4
Using devise 4.9.2
Using devise-two-factor 4.1.0
Using actioncable 7.0.8
Fetching puma 6.4.2
Using rails 7.0.8
Using rails-settings-cached 0.6.6 from https://github.com/mastodon/rails-settings-cached.git (at v0.6.6-aliases-true@86328ef)
Installing puma 6.4.2 with native extensions
Bundle complete! 130 Gemfile dependencies, 243 gems now installed.
Gems in the groups 'development' and 'test' were not installed.
Bundled gems are installed into `./vendor/bundle`
mastodon@instance-20230911-1538:~/live$ yarn install --frozen-lockfile
yarn install v1.22.21
[1/6] Validating package.json...
[2/6] Resolving packages...
success Already up-to-date.
$ husky install
husky - Git hooks installed
Done in 0.85s.
mastodon@instance-20230911-1538:~/live$ RAILS_ENV=production bundle exec rails assets:precompile
Compiling...
Compiled all packs in /home/mastodon/live/public/packs
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
at isModuleDeclaration (/home/mastodon/live/node_modules/babel-plugin-lodash/node_modules/@babel/types/lib/validators/generated/index.js:2740:35)
at PluginPass.Program (/home/mastodon/live/node_modules/babel-plugin-lodash/lib/index.js:102:44)

mastodon@instance-20230911-1538:~/live$ exit
logout
davidyin@instance-20230911-1538:~$ sudo systemctl restart mastodon-sidekiq
davidyin@instance-20230911-1538:~$ sudo systemctl reload mastodon-web
davidyin@instance-20230911-1538:~$ sudo systemctl restart mastodon-streaming

After the above process, I refreshed the Dashboard page.

The Mastodon version is 4.2.4. But the Ruby is still 3.2.2p53. So I reboot the VPS.

Reload the Dashboard. It is right.

The post Upgrade Mastodon v4.2.3 to v4.2.4 appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/01/upgrade-mastodon-v4-2-3-to-v4-2-4.html/feed/ 0
Error 500 of WordPress Admin https://www.yinfor.com/2024/01/error-500-of-wordpress-admin.html https://www.yinfor.com/2024/01/error-500-of-wordpress-admin.html#respond Sat, 27 Jan 2024 18:09:05 +0000 https://www.yinfor.com/?p=9456 WordPress has this problem, sometimes. I tried to sign in the backend of the WordPress website. It took a little bit longer to show the page without CSS or JS....

The post Error 500 of WordPress Admin appeared first on David Yin's Blog.

]]>
WordPress has this problem, sometimes. I tried to sign in the backend of the WordPress website. It took a little bit longer to show the page without CSS or JS.

It looks like below:

So I open the Web Developer Tools of the browser Firefox. Check the Network.

Refresh the page.

There is one 500 error on the site.

/wp-admin/locad-styles.php?**********

It is a script to combine the styles into one file. Then it is broken.

The solution I found on Google is to add a configuration line into the wp-config.php file.

 

Open the wp-config.php file.

Add the following before the require_once.

define('CONCATENATE_SCRIPTS', false); 

Then, refresh the Admin page. It looks OK.

All the CSS files are loaded individually.

The real reason, I believe, is because the Plugin or Theme has a small compatible issue with the WordPress program.

The post Error 500 of WordPress Admin appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/01/error-500-of-wordpress-admin.html/feed/ 0
How to Optimize PHP-FPM https://www.yinfor.com/2024/01/how-to-optimize-php-fpm.html https://www.yinfor.com/2024/01/how-to-optimize-php-fpm.html#respond Fri, 26 Jan 2024 01:33:39 +0000 https://www.yinfor.com/?p=9443 As I posted before, I have been using PHP-FPM for many years. I added a PHP-FPM status page recently. Now I am using PHP8.2, so I may use PHP-FPM or...

The post How to Optimize PHP-FPM appeared first on David Yin's Blog.

]]>
As I posted before, I have been using PHP-FPM for many years. I added a PHP-FPM status page recently.

Now I am using PHP8.2, so I may use PHP-FPM or PHP8.2-FPM to mention it.

About the PHP-FPM, I am always using its default configuration.

Today, I studied a post on Tideways. It talked about the three different process manager configurations, their related settings, and discussed when each configuration makes sense.  I tried to understand it and updated my PHP8.2-FPM settings according to its guide.

The PHP8.2-FPM settings are in the file /etc/php/8.2/fpm/pool.d/www.conf

I looked at the file. My current settings are as below:

pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
;pm.process_idle_timeout = 10s

I am using the formula to get the figure.

max_children (Total RAM – Memory used for Linux, DB, etc.) / process size
start_servers Number of CPU cores x 4
min_spare_servers Number of CPU cores x 2
max_spare_servers Same as start_servers

The first number I need number of CPU cores. My VPS has 4 cores.

The second is total RAM of my VPS. It is 8GB. I assumed the memory used for Ubuntu, MySQL server, etc. is 2GB.

I also need a process size of PHP8.2-FPM.

So I got the ps_mem.py file. Then run it with sudo python3 ps_mem.py | grep php-fpm

8.3 MiB + 9.6 MiB = 17.9 MiB php-fpm8.0 (3)
8.5 MiB + 10.4 MiB = 18.9 MiB php-fpm8.3 (3)
9.1 MiB + 13.0 MiB = 22.1 MiB php-fpm8.1 (6)
102.1 MiB + 145.7 MiB = 247.8 MiB php-fpm8.2 (9)

Here, the last line is PHP8.2-FPM. The memory each process needs is 248MB.

I got my new figure.

pm = dynamic
pm.max_children = 24
pm.start_servers = 16
pm.min_spare_servers = 8
pm.max_spare_servers = 16
;pm.process_idle_timeout = 10s

I gave it a little bit of room for other programs, I may need on this VPS.

pm = dynamic
pm.max_children = 20
pm.start_servers = 8
pm.min_spare_servers = 4
pm.max_spare_servers = 8
pm.process_idle_timeout = 10s

And I remove the comment sign from the timeout setting as well.

Save the settings and restart the PHP-FPM by running sudo service php8.2-fpm restart

Now I check the status of PHP-FPM.

 

 

The post How to Optimize PHP-FPM appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/01/how-to-optimize-php-fpm.html/feed/ 0
5 tips that can help improve your credit scores https://www.yinfor.com/2024/01/5-tips-that-can-help-improve-your-credit-scores.html https://www.yinfor.com/2024/01/5-tips-that-can-help-improve-your-credit-scores.html#respond Tue, 23 Jan 2024 21:34:54 +0000 https://www.yinfor.com/?p=9385 I got an email from Equifax. I like to share the email here. 5 tips that can help improve your credit scores 1) Pay on time: One of the best...

The post 5 tips that can help improve your credit scores appeared first on David Yin's Blog.

]]>
I got an email from Equifax. I like to share the email here.

5 tips that can help improve your credit scores

1) Pay on time: One of the best things you can do to improve your credit scores is to pay your minimum payments on time, every time.

2) Keep your credit utilization rate low: It’s typically best to use 30 percent or less of the credit available to you on your revolving credit accounts, such as credit cards.

3) Limit applying for new accounts: Applying for new credit accounts will usually lead to a hard inquiry on your credit report. Sometimes these can negatively affect your credit scores for a short period of time.

4) Keep old accounts open: One of the factors in calculating credit scores is “average age of accounts,” so keeping paid-off accounts open can help maintain the length of your credit history, and help improve your credit scores.

5) Review your credit reports regularly: It’s important to check your credit reports regularly for any unpaid balances or past-due accounts, which can negatively impact your credit scores. You can also check for inaccuracies or signs of identity theft, such as credit accounts you didn’t apply for or a phone number that doesn’t belong to you.

I knew these tips except for “keep old accounts open”. I did cancel some credit card accounts because I don’t use it anymore.

I saw a poster from the Federal Reserve of USA Gov site.  It has 5 tips for improving your credit score.

1) Get copies of your credit report –  then make sure the information is correct.

2) Pay your bills on time.

3) Understand how your credit score is determined.

4) Learn the legal steps you must take to improve your credit report.

5) Beware of credit-repair scams.

Look, they are different from Equifax.

How to check your Credit score and get the Credit report for free?

1) I have a Scotia Bank account. Within its App, I can check the TransUnion credit score for free.

My score is 900 today. If I click the Credit score report, I can see the details of the report. It includes all my accounts, open or closed. It shows the current balance, limit, and loan type of each account.

2)  Borrowell Service

I registered the account on Borrowell.com.  It has a credit score based on Equifax data.

My credit score here is 838. It is different because it uses different sources of data and the way of calculating.

I still have the excellent credit.

 

The post 5 tips that can help improve your credit scores appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/01/5-tips-that-can-help-improve-your-credit-scores.html/feed/ 0
Email server DNS settings with Cloudflare https://www.yinfor.com/2024/01/email-server-dns-settings-with-cloudflare.html https://www.yinfor.com/2024/01/email-server-dns-settings-with-cloudflare.html#respond Mon, 22 Jan 2024 21:08:24 +0000 https://www.yinfor.com/?p=9432 I just noticed how to set up the DNS record for the Email server on Cloudflare DNS. It should be DNS only. I have my very own Email server, with...

The post Email server DNS settings with Cloudflare appeared first on David Yin's Blog.

]]>
I just noticed how to set up the DNS record for the Email server on Cloudflare DNS.

It should be DNS only.

I have my very own Email server, with IP address, a.b.c.d. It is powered by iRedmail.

In Cloudflare DNS. I should set it up like this.

1) Add an A record for this mail subdomain.

Type Name IPv4 address Proxy status
A mail a.b.c.d DNS only

2) Add an MX record that points to the subdomain above.

Type Name Mail server TTL
MX @ mail.example.com Auto

I was doing it in the wrong way. Made it in Proxied.

Then no email can be sent and received.  When I use Thunderbird Email App to retrieve the emails, it shew TimeOut.

 

The post Email server DNS settings with Cloudflare appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/01/email-server-dns-settings-with-cloudflare.html/feed/ 0
Enable PHP-FPM Status Page with Nginx https://www.yinfor.com/2024/01/enable-php-fpm-status-page-with-nginx.html https://www.yinfor.com/2024/01/enable-php-fpm-status-page-with-nginx.html#respond Sun, 21 Jan 2024 19:20:31 +0000 https://www.yinfor.com/?p=9415 I have been using PHP-FPM to interpret the PHP language program for years.  My server or VPS is powered by Ubuntu, most time the latest LTS version or the second...

The post Enable PHP-FPM Status Page with Nginx appeared first on David Yin's Blog.

]]>
I have been using PHP-FPM to interpret the PHP language program for years.  My server or VPS is powered by Ubuntu, most time the latest LTS version or the second latest version. I like Nginx for web servers. In the title I said php-fpm. It could be php8.2-fpm, php8.1-fpm. The different version of php-fpm has different names.

Now this post is about how to add the PHP-FPM status page to the web.

Enable php-fpm Status page

SSH to the VPS, find the file, /etc/php/8.2/fpm/pool.d/www.conf

sudo nano www.conf

Located pm.status_path = /status

Remove the # to un-comment it.

Then run the command to restart the php8.2-fpm service.

sudo service php8.2-fpm restart

Edit the Nginx Web server settings

My website configuration files are located in /etc/nginx/conf.d/

sudo nano mysite.conf

Add following into the server block.

location ~ ^/(status|ping)$ {
access_log off;
allow 127.0.0.1;
allow your-ip-address;
deny all;
fastcgi_index /php-fpm/status;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
# fastcgi_pass 127.0.0.1:9000;
}

Look at the code above carefully.
1) Replace your-ip-address with your IP address. It will only allow you to access this status page.
2) Choose the way you use php-fpm. I am using a socket connection. If you are using a TCP connection, you should modify the code above.

Then restart the Nginx server.

sudo service nginx restart 

Go to the desktop browser to load the status web page.

pool:                 www
process manager:      dynamic
start time:           20/Jan/2024:00:54:13 -0800
start since:          51012
accepted conn:        24883
listen queue:         0
max listen queue:     0
listen queue len:     0
idle processes:       2
active processes:     1
total processes:      3
max active processes: 3
max children reached: 0
slow requests:        0

 

php8.2-fpm status

There are also more details status page.
Examples for summary status page:

http://example.com/status
http://example.com/status?json
http://example.com/status?html
http://example.com/status?xml

Example for detailed status page:

http://example.com/status?full
http://example.com/status?json&full
http://example.com/status?html&full
http://example.com/status?xml&full

You can use json or xml format to process status page output programatically. HTML is useful when viewing detailed status report.

The PHP official docs page.

Definations

  • pool – the name of the pool. Mostly it will be www.
  • process manager – possible values static, dynamic or ondemand. We never use static. Trying ondemand is on todo list.
  • start time – the date and time FPM has started or reloaded. Reloading PHP-FPM (service php8.2-fpm reload) reset this value.
  • start since – number of seconds since FPM has started
  • accepted conn – the number of request accepted by the pool
  • listen queue – the number of request in the queue of pending connections. If this number is non-zero, then you better increase number of process FPM can spawn.
  • max listen queue – the maximum number of requests in the queue of pending connections since FPM has started
  • listen queue len – the size of the socket queue of pending connections
  • idle processes – the number of idle processes
  • active processes – the number of active processes
  • total processes – the number of idle + active processes
  • max active processes – the maximum number of active processes since FPM has started
  • max children reached – number of times, the process limit has been reached, when pm tries to start more children. If that value is not zero, then you may need to increase max process limit for your PHP-FPM pool. Like this, you can find other useful information to tweak your pool better way.
  • slow requests – Enable php-fpm slow-log before you consider this. If this value is non-zero you may have slow php processes. Poorly written mysql queries are generally culprit.

Here is a sample of full detailed status page in HTML format.

HTML format Full status php8.2-fpm
Meaning of the items.

  • pid – the PID of the process. You can use this PID to kill a long running process.
  • state – the state of the process (Idle, Running, …)
  • start time – the date and time the process has started
  • start since – the number of seconds since the process has started
  • requests – the number of requests the process has served
  • request duration – the duration in µs of the requests
  • request method – the request method (GET, POST, …)
  • request URI – the request URI with the query string
  • content length – the content length of the request (only with POST)
  • user – the user (PHP_AUTH_USER) (or ‘-‘ if not set)
  • script – the main PHP script called (or ‘-‘ if not set)
  • last request cpu – the %cpu the last request consumed. it’s always 0 if the process is not in Idle state because CPU calculation is done when the request processing has terminated
  • last request memorythe max amount of memory the last request consumed. it’s always 0 if the process is not in Idle state because memory calculation is done when the request processing has terminated

Getting the php8.2-fpm status page is one of the steps to prepare for php optimization. I need more data to analyze and make a decision.

The post Enable PHP-FPM Status Page with Nginx appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2024/01/enable-php-fpm-status-page-with-nginx.html/feed/ 0