## domain name system – How does DNS TTL work in chained CNAME configurations?

I have a DNS config that looks something like this:

``````www.example.com                 600  IN   CNAME prod.myzone.l2.company.example
prod.myzone.l2.company.example      600  IN   CNAME ssl-endpoint-12345.hostcorp.example
ssl-endpoint-12345.hostcorp.example 60   IN   A     192.0.2.4
``````

So the first two CNAME records in the chain have a TTL of 10 minutes, and the final A record has a TTL of 1 minute

The `prod.myzone.l2.company.example` CNAME does regional load-balancing between multiple endpoints, and is automatically updated if my DNS provider determines that the current endpoint is unhealthy. For this reason, I would like to propagate changes to the `prod.myzone.l2.company.example` CNAME as quickly as possible.

If I wanted to reduce overall TTL that clients when `prod.myzone.l2.company.com`, is it sufficient to only reduce the TTL of the `prod.myzone.l2.company.com` record, or do I also need to reduce the TTL on the `www.example.com` record as well?

## algorithms – Ensuring radial symmetry when distributing a vectorial quantity on arbitrary particle configurations

I come from a physics background, and I am trying to find some more information on this problem that I am encountering, and which I describe below. I don’t know whether this sort of problem has some particular names or terminologies that I’m not aware of, so if that might be the case, I’d be very grateful if you could point me in that direction.

Here’s the problem that I’m having:

Suppose I have an arbitrary particle configuration (say in 2D or 3D). Now I pick any random particle, and find its $$N_{ngb}$$ closest neighbours. I now want to distribute a vectorial quantity $$mathbf{Q}$$ amongst all these neighbours, which must satisfy the following conditions:

• the direction of the quantity that I distribute is determined by the difference in position between the neighbour particle and the chosen particle, i.e. $$mathbf{Q}_i$$ is parallel to $$mathbf{x}_i – mathbf{x}_{chosen}$$
• The sum of all magnitudes of the distributed quantities $$mathbf{Q}_i$$ must be equal to a value I choose: $$sum_i |mathbf{Q}_i| = Q_{tot}$$
• the distributed quantity must be radially symmetric, i.e. $$sum_i mathbf{Q}_i = mathbf{0}$$

However, there are also some further limitations on the algorithm side:

• I can only afford to loop over the neighbouring particles twice: Once to gather neighbour information (the neighbours are already determined at that point), and once to distribute the quantity
• I can’t store all of the neighbour data while determining how to distribute the quantity such that it satisfies the conditions above. For example, I can’t collect all neighbour positions in a list during the first loop, then use this list to determine how to distribute the quantity, and then distribute it in a second loop.

## PgBouncer Pool configurations

I have installed PgBouncer because of too many connections on database server.
How can i check if BgBouncer pool is working.
When i perform SELECT * FROM pg_stat_database order by numbackends desc; I see that numbackends are more than one for different databases ?
Does it mean pool is not working ?

## magento2 – Magento 2 – 1 image stored for multiple configurations

I am working on a store that is comprised of mostly configurable products. I am importing and adding products from a suppliers API into the magento store. My command is running fine. However, I can’t seem to find a way for the simple products to share an image.

For EG, my command will save ‘Shirt-Black-Default.jpg’ in the catalog folder. I would like the different size variations of Shirt Black to use the same image to save space. However, when I use \$product->addImageToMediaGallery()… no matter what it will always create a duplicate of the saved image, even if the parameter is the path of the image already in pub/media/catalog/product.

Is it possible in Magento 2 for multiple products to share the same image?

## email – How do I create separate mailbox configurations per virtual user with Dovecot?

Let’s say I have two virtual users: `bugs@domain.tld` and `admin@domain.tld`.

I want the mailboxes for `bugs` to be configured like this…:

``````mailbox Sent {
special_use = Sent
}
mailbox Drafts {
special_use = Drafts
}
mailbox "Priority 1" {
auto = subscribe
}
mailbox "Priority 2" {
auto = subscribe
}
mailbox "Priority 3" {
auto = subscribe
}
mailbox Unreplied {
auto = subscribe
}
mailbox Resolved {
auto = subscribe
}
``````

…but have the mailboxes for `admin` have some different folders configured:

``````mailbox Sent {
special_use = Sent
}
mailbox Drafts {
special_use = Drafts
}
mailbox System {
auto = subscribe
}
mailbox DMARC {
auto = subscribe
}
mailbox Archives {
auto = create
special_use = Archive
}
mailbox Trash {
special_use = Trash
}
mailbox Spam {
auto = create
special_use = Junk
}
``````

I don’t want the folders for the `bugs` email to be copied over to the `admin` email, and vice versa.

What I’ve tried is using namespaces and then setting each virtual user’s inbox namespace name via my passwd file, like this:

``````admin:<password>::::::userdb_mail=maildir:/home/mail/admin NAMESPACE=primary userdb_namespace/primary/inbox=yes userdb_namespace/primary/list=yes userdb_namespace/primary/prefix=primary/

``````

but Dovecot’s logs say:

`namespace configuration error: Duplicate namespace prefix: "" in=0 out=408 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0`

My full `15-mailboxes.conf`:

``````namespace bugs {
list = no
type = private
mailbox Sent {
special_use = Sent
}
mailbox Drafts {
special_use = Drafts
}
mailbox "Priority 1" {
auto = subscribe
}
mailbox "Priority 2" {
auto = subscribe
}
mailbox "Priority 3" {
auto = subscribe
}
mailbox Unreplied {
auto = subscribe
}
mailbox Resolved {
auto = subscribe
}
}
namespace primary {
list = no
type = private
mailbox Sent {
special_use = Sent
}
mailbox Drafts {
special_use = Drafts
}
mailbox System {
auto = subscribe
}
mailbox DMARC {
auto = subscribe
}
mailbox Archives {
auto = create
special_use = Archive
}
mailbox Trash {
special_use = Trash
}
mailbox Spam {
auto = create
special_use = Junk
}
}
``````

## magento2 – Magento 2 Dies When Creating a Confugurable Product with 2000 Configurations

IMHO, if you need a configurable product with over 2k variations, then something might be fishy in the way you are modeling the business requirement. Sure, there are business over there where this solution might sound like what they need, but think of the resources that are being consumed when working with such a large volume of variations:

• when a child product updates price or inventory data, the parent is also updated;
• your admin crashes when you are performing a save, my assumption that it will continue to do so as the request either takes too long and is killed by the server or it eats up the memory;
• also, on frontend, a page load without cache will be in trouble;
• UX-wise, the interaction of the end user with this product sounds like a big no-no.

You could try to update/ save the product via API, but it’s a very tedious job to keep all the children product data JSONs in a valid shape and format.

My recommendation would be to try to break down the parent product somehow.

## Turing machine sequence of configurations

hello I have written the sequence of configurations for the following Turing machine for input 00 but my answer has been marked wrong and I’m not sure where I have gone wrong I have fried it 3 times.

this is the turning machine

## reference request – Optimal configurations on the flat torus

I’m studying (with my colleagues R.Piergallini and S.Isola) configurations of points on the flat torus which minimize an attractive or repulsive potential depending on the distance, in the flat metric or in the Euclidean metric of $$mathbb{R}^4$$. Two model cases are $$frac{left(d-d_0right)^2}{2}$$, where $$d_0ge 0$$, and $$d^{-1}$$. There is abundance of literature on similar problems on the sphere (although typically using the distance in $$mathbb{R}^3$$, as famously asked in Smale’s 7th problem (1)), but we found almost nothing on the torus. By the way, we’re interested in the case of $$T^2=mathbb{R}^2/mathbb{Z}^2$$ as well as that a flat torus generated by circles with different radii (so as to allow, if the shape ratio is suitable, the existence of a hexagonal geodesic lattice).

Do you know papers on this subject?

(1): Smale, S. (1998). Mathematical problems for the next century. The mathematical intelligencer, 20(2), 7-15.

## utxo set – What do these memory configurations in debug.log of BitCoin Core represent?

In the debug.log file of BitCoin Core, the cache configuration is described as follows.

``````Cache configuration:
Using 2.0 MiB for block index database
Using 8.0 MiB for chain state database
Using 441.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
``````

What is the 8MB cache space allocated for chainstate database here used for? What is the difference and connection between it and the in-memory UTXO set?

## magento2 – Elasticsearch is not working after configurations in Magento admin

Installed details: Magento 2.4.2, Elasticsearch 7.6.0, Ububtu 20.04.

Elasticsearch is working on localhost:9200.

``````{
"name" : "magento",
"cluster_name" : "my-application",
"version" : {
"number" : "7.6.0",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "7f634e9f44834fbc12724506cc1da681b0c3b1e3",
"build_date" : "2020-02-06T00:09:00.449973Z",
"build_snapshot" : false,
"lucene_version" : "8.4.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
``````

I made the necessary configurations in the Stores/Configurations/Catalog/Catalog/Catalog Search.

then `php bin/magento cache:clean` and `bin/magento indexer:reindex`, then tried to search.

But the problem is that the search does not work on the Luma page:

I checked http://127.0.0.1:9200/_cat/indices?v:

``````health status index                            uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   magento2_es_demo5x1_product_1_v2 W4E0HOGtTd6Y4LCBWvo3-w   1   1          0            0       283b           283b
yellow open   magento2_product_1_v9            YerIXZhrSii_b5wxarJ6hA   1   1          0            0       283b           283b
``````

checked http://127.0.0.1:9200/magento2_product_1_v9/_search?pretty=true:

``````{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 0,
"relation" : "eq"
},
"max_score" : null,
"hits" : ( )
}
}
``````

(I can provide the necessary details).

Just started learning Magento and ElasticSearch, so I really ask the community to tell me in detail what to do to make ElasticSearch work in my Magento project.