design patterns – Should there only ever be one instance of a ViewModel object?

Assume a rather simplistic model:

class Person{   
   static List<Person> LivingPersons

   String Name
   List<Person> Dependents 
}

From this it can (hopefully) be seen that a single Person object can be both within the LivingPersons list and within the Dependents list of another Person object. Similarly, if there were a couple of ViewModels to represent this model:

class ViewModel_LivingPersons{
   static List<ViewModel_Person> LivingPersons
}

class ViewModel_Person{
   String Name
   List<ViewModel_Person> Dependents   
}

If I had a single Person object that resided in both the LivingPersons list and within the Dependents list of another Person, my gut feeling tells me that as it is the same model object being represented there should only ever be one instance of a ViewModel_Person to represent this model object. However, I do not know why, nor if this is best practice.

I’m not certain of the best practices here. I’ve done a bit of searching, but cannot find anything on this particular issue.

Will installing a second SQL Instance cause an outage on existing instances?

Like the title says, I just want to verify if we have the need to install a secondary SQL instance on a server that already has one SQL Instance, will the installation of the secondary instance cause an outage on the first?

Linked server – cannot create an instance of OLE DB provider "SQLNCLI11"

I have created linked server and made sure "allow inprocess" is checked and still get and error.
I can telnet to the other server and sql serer 2017 is 64bit and the SQLncli11 is both 32bit and 64bit.
Any ideas
enter image description here

debian – My files were randomly deleted from my Google Cloud VM instance

I’m hosting a Minecraft Server from Google Cloud, and all of the sudden the server shut down, I went into the console to restart it just to find that the files were nowhere to be found. I looked at the logs but there were none at the time of the incident, has this ever happened to someone else? Can I get my files back?

Thank you

Move everything from old D8 to new instance of D9

Looking for best practices for moving everything (nodes, blocks, paragraphs, users, content types) from D8.7.8 to a fresh install of D9.1.0

solid – Clean Architecture: Controller creates a RequestModel instance or implements RequestModel?

I have checked many articles and discussions around the web.

So we have the main diagram:

Uncle Bob's Clean Architecture Diagram

So we have Controller pointing directly to RequestModel.

So straight to the point, should I:

  1. Create a RequestModel class on “delivery” (is how uncle bob calls this layer) layer that implements a RequestModel interface, create the instance of RequestModel concrete class in controller and “throw it in the flow”
  2. Create a RequestModel class on use-case layer, create the instance of RequestModel class in controller and “throw it in the flow”

From my initial understanding, option 2 violates some SOLID principles, correct?

Magento2.4.2 – After Installing Fresh Instance All Pages Messy

I have tried to install Magento2.4.2 in both way.

  1. Using Composer & 2. Downloading .zip

Both time I have found root index.php file is missing. After adding from Magento2.4.1 in console getting error

enter image description here

From very first view we can see the path becomes wrong.

In correct Path : http://127.0.0.1/magento242/static/version1613139426/frontend/Magento/luma/en_US/images/logo.svg

Correct Path : http://127.0.0.1/magento242/pub/static/version1613139426/frontend/Magento/luma/en_US/images/logo.svg

Anyone face the same issue ?

Thank you.

instance – Running multiple programs from a single Ubuntu Server

I have a very basic server set up on an old desktop PC at home running Ubuntu Server 20.04.2. I have been able to get it hosting inbound and outbound connections for a Minecraft Bedrock server (using the current Oficial Alpha release) I have all of that working smoothly. I was wondering if there was a way to run two instances of the Bedrock software on the one machine (to host two separate games at the same time).

I can SSH into the machine through PuTTY on my own personal machine running windows 10

specs:

I do not have a hard drive, its just a USB stick (SAMSUNG 32G)

8 gigs of ram

an old AMD 64bit processor, (I forgot the model, likely from before 2006)

integrated motherboard graphics (probably not required for the list but ill include them anyways)

linux – Help me tune Mysql instance to support more users

I’m currently supporting, A Moodle 3.10 instance, running MySQL 8.0.20. This is running through an Azure Provider as a Standard DS11(2 vcpus, 14 GiB memory). Running as a LAMP stack server.

Currently, there is a bottleneck on the Server with the load on the database and low usage of memory, during peak windows.

Need to find optimal ways to tune the database to support more concurrent users (it slows down at ~100 users, would like to get it to support 250 users if possible.

Attached a MySQL Tuner file below as well.

(--) Skipped version check for MySQLTuner script
Please enter your MySQL administrative password: (OK) Currently running supported MySQL version 8.0.20
(OK) Operating on 64-bit architecture
 
-------- Log file Recommendations ------------------------------------------------------------------
(!!) Log file /opt/bitnami/mysql/data/mysqld.log doesn't exist
 
-------- Storage Engine Statistics -----------------------------------------------------------------
(--) Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA 
(--) Data in InnoDB tables: 2.9G (Tables: 464)
(OK) Total fragmented tables: 0
 
-------- Analysis Performance Metrics --------------------------------------------------------------
(--) innodb_stats_on_metadata: OFF
(OK) No stat updates during querying INFORMATION_SCHEMA.
 
-------- Security Recommendations ------------------------------------------------------------------
(--) Skipped due to unsupported feature for MySQL 8
 
-------- CVE Security Recommendations --------------------------------------------------------------
(--) Skipped due to --cvefile option undefined
 
-------- Performance Metrics -----------------------------------------------------------------------
(--) Up for: 6d 11h 7m 48s (99M q (178.845 qps), 10M conn, TX: 58G, RX: 11G)
(--) Reads / Writes: 85% / 15%
(--) Binary logging is enabled (GTID MODE: OFF)
(--) Physical Memory     : 13.7G
(--) Max MySQL memory    : 10.9G
(--) Other process memory: 0B
(--) Total buffers: 6.0G global + 33.3M per thread (151 max threads)
(--) P_S Max memory usage: 72B
(--) Galera GCache Max memory usage: 0B
(OK) Maximum reached memory usage: 7.2G (52.85% of installed RAM)
(OK) Maximum possible memory usage: 10.9G (79.89% of installed RAM)
(OK) Overall possible memory usage with other process is compatible with memory available
(OK) Slow queries: 0% (0/99M)
(OK) Highest usage of available connections: 24% (37/151)
(OK) Aborted connections: 0.00%  (7/10825746)
(--) Query cache have been removed in MySQL 8
(OK) Sorts requiring temporary tables: 0% (52 temp sorts / 2M sorts)
(!!) Joins performed without indexes: 81493
(OK) Temporary tables created on disk: 0% (1K on disk / 2M total)
(OK) Thread cache hit rate: 99% (37 created / 10M connections)
(OK) Table cache hit rate: 27% (4K open / 14K opened)
(OK) table_definition_cache(2000) is upper than number of tables(774)
(OK) Open file limit used: 0% (2/65K)
(OK) Table locks acquired immediately: 100% (141K immediate / 141K locks)
(OK) Binlog cache memory access: 99.95% (8182744 Memory / 8186895 Total)
 
-------- Performance schema ------------------------------------------------------------------------
(--) Memory used by P_S: 72B
(--) Sys schema is installed.
 
-------- ThreadPool Metrics ------------------------------------------------------------------------
(--) ThreadPool stat is disabled.
 
-------- MyISAM Metrics ----------------------------------------------------------------------------
(--) MyISAM Metrics are disabled on last MySQL versions.
 
-------- InnoDB Metrics ----------------------------------------------------------------------------
(--) InnoDB is enabled.
(--) InnoDB Thread Concurrency: 0
(OK) InnoDB File per table is activated
(OK) InnoDB buffer pool / data size: 6.0G/2.9G
(OK) Ratio InnoDB log file size / InnoDB Buffer pool size: 768.0M * 2/6.0G should be equal to 25%
(!!) InnoDB buffer pool instances: 8
(--) Number of InnoDB Buffer Pool Chunk : 48 for 8 Buffer Pool Instance(s)
(OK) Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size & Innodb_buffer_pool_instances
(OK) InnoDB Read buffer efficiency: 100.00% (5172515853 hits/ 5172589612 total)
(!!) InnoDB Write Log efficiency: 78.71% (75749720 hits/ 96240545 total)
(OK) InnoDB log waits: 0.00% (0 waits / 20490825 writes)
 
-------- AriaDB Metrics ----------------------------------------------------------------------------
(--) AriaDB is disabled.
 
-------- TokuDB Metrics ----------------------------------------------------------------------------
(--) TokuDB is disabled.
 
-------- XtraDB Metrics ----------------------------------------------------------------------------
(--) XtraDB is disabled.
 
-------- Galera Metrics ----------------------------------------------------------------------------
(--) Galera is disabled.
 
-------- Replication Metrics -----------------------------------------------------------------------
(--) Galera Synchronous replication: NO
(--) No replication slave(s) for this server.
(--) Binlog format: ROW
(--) XA support enabled: ON
(--) Semi synchronous replication Master: Not Activated
(--) Semi synchronous replication Slave: Not Activated
(--) This is a standalone server

-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
    We will suggest raising the 'join_buffer_size' until JOINs not using indexes are found.
             See https://dev.mysql.com/doc/internals/en/join-buffer-size.html
             (specially the conclusions at the bottom of the page).
Variables to adjust:
    join_buffer_size (> 256.0K, or always use indexes with JOINs)
    innodb_buffer_pool_instances(=6)

lxd – LXC No space left on device when trying to delete instance

I tried to follow the the LXC tutorial https://www.digitalocean.com/community/tutorials/how-to-set-up-and-use-lxd-on-ubuntu-16-04

When running command lxd init I used all defaults except 1GB as disk space (my disk remaining free space is just 20GB so couldn’t allocate more). I hope it would auto grow as in VirtualBox or Hyper-V.

Then I run lxc launch ubuntu:20.04 webserver but it show “not enough disk space”. OK, so I want to try again with a bigger disk.

I run lxc storage rm default, it showed:

Error: The storage pool is currently in use

It makes sense I need to remove the VM first. I tried lxc rm webserver and it showed:

Error: Error deleting storage volume: Failed deleting subvolume "/var/snap/lxd/common/lxd/storage-pools/default/containers/webserver": Failed to run: btrfs subvolume delete /var/snap/lxd/common/lxd/storage-pools/default/containers/webserver: ERROR: cannot delete '/var/snap/lxd/common/lxd/storage-pools/default/containers/webserver': No space left on device

I feel dumb because I want to reclaim disk space but it’s like a dead loop. Google yields no result.

What should I do?
Thanks.

Additional information:
Host’s host: Windows 10 Hyper-V, 20GB remaining, virtual size 1TB auto grow
Host: Ubuntu 20.04