An unexpected error has occurred. Web Parts Maintenance Page: If you have permission, you can sue this page to temporarily close Web Parts

I have updated SP2013 farm to SP2016 in a new environment. Everything went well except some customised web parts. When I click on ex “Create customer” which is a customised webpart I get the error message:

An unexpected error has occurred. Web Parts Maintenance Page: If you have permission, you can sue this page to temporarily close Web Parts or remove personal settings. I have already deleted and readded the webparts, edited the web.config with different solutions which I found on the Internet but I just got more problems. I have even deleted and reinstalled the PerformancePoint service application. When I try to add a standard SP webpart, it works fine but not the customised webpart.

Have you please any idea about this issue and how to solve it?

Regards Ashraf

How do I make sure I run maintenance on the whole disk with Ubuntu on btrfs?

I am trying to learn btrfs and have Ubuntu installed with the disk partitioned with volumes for / and /home. This is the way the Ubuntu installer did it when I selected btrfs as file system. fstab looks like this:

# <file system> <mount point>   <type>  <options>       <dump>  <pass> # / was on /dev/nvme0n1p2 during installation UUID=43b93f24-bf6a-45a9-acf4-56868d30852e /               btrfs   defaults,subvol=@ 0       1 # /boot/efi was on /dev/nvme0n1p1 during installation UUID=F868-F3FE  /boot/efi       vfat    umask=0077      0       1 # /home was on /dev/nvme0n1p2 during installation UUID=43b93f24-bf6a-45a9-acf4-56868d30852e /home           btrfs   defaults,subvol=@home 0       2 /swapfile                                 none            swap    sw              0       0 

I have installed the ‘btrfsmaintenance’ package and trying to set it up. The one thing I do not understand is how to indicate the mountpoint/filesystemts to run maintenance on. If I want to run it on the whole disk do I simply set “/” or do I have to indicate each subvolume / and /home ?

Magento 2: Automatically maintenance mode

We have several stores running on EKS (Kubernetes) and for some reason one of the stores enter on maintenance mode for no reason: Unable to proceed: the maintenance mode is enabled.

We are using Magento Enterprise 2.3.1. There is no one going into the containers to enable maintenance mode, even when there is no code deploy or users using the stores (this is a stage environment) the maintenance mode appears. When we have the OPs team take a look at the var/.maintenance.flag, the file was created by root and sometimes it takes time to be deleted. Looking at the logs I can see that sometimes the store will throw errors for an hour or just a few minutes.

Has anyone been affected by this? It looks like schedule backups and setup:upgrade commands can create the flag, but these are not running when the flag is created.


Google Cloud gone to maintenance for at least a day. No way to get it working or extract data

We having yet another critical issue with Google Cloud SQL (MySQL Gen 2). Server gone to maintenance for almost a day, and still unusable. So our production and development databases are both trapped there. We can not restart the instance, we can not download backups or do some export. In essence, all controls are blocked for this server. We clicked at Help -> Send Feedback twice with screenshot and no reaction was given.

We can not afford another $ 150 per month aka $ 1800 for year for our startup to pay for fixing possible single “disaster of the year”!

Hey, Google, I can not believe that you do not see how that server cries with pain, shock and disbelief, shaking and covered with thick layer of dirty error logs!

[ Maintenance & Repairs ] Open Question : How can you tell if a used car should have originally come with a key fob?

There are no locks on the outside of my used 2003 Ford Escape other than the one on the driver’s side door. Should I just be able to buy and program a new key fob? It’s kind of a pain especially when you have groceries, etc. that need to go in the back.

Shutdown ESXi 6.7 with a script via SSH without entering maintenance mode

I’m trying to write a script that ssh’s to an ESXi 6.7 and shuts down the host and also shuts down the VMs according to the current system shutdown policy.

I’m running Dell customized image ESXi 6.7 in a Dell R710 with a dual Xeon X5650 and 144GB RAM.

In fact what I want is the same that I can get with:

Shutdown via GUI

Shutdown via console

I have ssh enabled in the server.

I already tryed:

1) (it just gets there indefinitely).

2) /bin/ (it to gets there indefinitely).

3) halt (shutdowns the server but it does not shuts down the VMs)

I also tried:

esxcli system shutdown poweroff --reason I_want_IT 

but the system must be in maintenance mode and I want to do it without entering maintenance mode

I then discovered this thread here in Server Fault, but it does not work in my server (I suppose it only runs on ESXi 5):

How do I shutdown the Host over ssh on ESXi 5 so it shuts down the guests properly?

I think I’m too dumb to discover on my own how to do it, because I presume it must be a simple thing to do.

Drupal maintenance over several environments

I have a production environment for a Drupal 7 site.

This environment is replicated to a staging environment, which we use for testing updates to modules and drupal core (same major version).

We would like to sync this environment with the production one everytime we want to test an update, and then replicate the changes.

The way I envision the process is the following:

  1. rsync everything from production to staging, getting the updated content from production and crushing any staging changes, deleting any files from staging that do not exist in production

  2. replicate database from production to staging, so we can test pages and functionalities on production content replica

  3. perform updates on the staging environment

  4. rsync from staging to production, not deleting in production content that might not exist in staging

Question #1: Do updates make changes to the database? Or are these file only changes? Will rsync be enough to get the production in sync with staging after the updates?

Question #2: Is there a better, more robust way to achieve this?

Question #3: Should I set the site into maintenance mode while doing #4? Can this be done by setting maintenance mode programatically in a config file, rsync that file and everything else, then reset the maintenance mode and rsync that file? (I am looking to build a script to automate this)

Population dynamic simulation on biological information maintenance 2

This question is the follow-up to this previous question.


Using this simulation I investigate a system in which enzymes proliferate in cells. During the replications of enzymes, parasites can come to be due to mutation. They can drive the system into extinction. I’m interested in where in the parameter space coexistence is possible.

I have made the changes advised by HoboProber. Namely correction of style and implementing the model relying on Numpy. So now the system is a 2-dimensional array. Cells are the rows of the array. The values of the first column are the numbers of enzymes and the values of the second column are the numbers of parasites.

My request

The speed of the new implementation is already way better than that of the previous one. But as I would like to increase population_size and gen_max every bit of performance improvement counts.
So far I examined the system with population sizes ranging from 100 to 1000 cells and with the maximal number of generations being 10000. The amount of increase in population size depends on performance. A million cells would be a perfectly reasonable assumption concerning the modelled system. The maximal number of generations should be 20-30000.

  • Primarily, does the code make use of vectorization and Numpy as effectively as it can? E.g. at which parts should I pay attention to C-ordering and F-ordering or should I at all?
  • Could performance profit from making use of multithreading/multiprocessing in this case? E.g. when the proliferation of molecules happens, the replication events in different cells are independent of each other. They could happen in parallel maybe.
  • Could performance profit from making use of static typing and compiling? E.g. using Cython or Numba.

Of course any advice is highly appreciated! (E.g. on writing data to file more effectively.)

The code

# -*- coding: utf-8 -*- """ Collect data on an enzyme-parasite system explicitly assuming compartmentalization.  Functions --------- simulation()     Simulate mentioned system.  write_out_file()     Write data to csv output file. """ import csv import time import numpy as np   def simulation(population_size, cell_size, replication_rate_p, mutation_rate, gen_max):     """     Simulate an enzyme-parasite system explicitly assuming compartmentalization.      Parameters     ----------     population_size : int         The number of cells.      cell_size : int         The maximal number of replicators of cells at which cell division takes place.      replication_rate_p : int or float         The fitness (replication rate) of the parasites         relative to the fitness (replication rate) of the enzymes.         Example         -------             $   replication_rate_p = 2         This means that the parasites' fitness is twice as that of the enzymes.      mutation_rate : int or float         The probability of mutation during a replication event.      gen_max : int         The maximal number of generations.         A generation corresponds to one outer while cycle.         If the system extincts, the number of generations doesn't reach gen_max.      Yield     -------     generator object         Contains data on the simulated system.     """     def fitness(population):         """         Calculate fitnesses of cells.         Fitness of a cell = number of enzymes/(number of enzymes + number of parasites)          Parameter         ---------         population : ndarray             The system itself.          Return         ------         ndarray             The fitness of each cell of the system.         """         return population[:, 0]/population.sum(axis=1)      def population_stats(population):         """         Calculate statistics of the system.          Parameter         ---------         population : ndarray             The system itself.          Return         -------         tuple             Contains statistics of the simulated system.         """         gyak_sums = population.sum(axis=0)         gyak_means = population.mean(axis=0)         gyak_variances = population.var(axis=0)         gyak_percentiles_25 = np.percentile(population, 25, axis=0)         gyak_medians = np.median(population, axis=0)         gyak_percentiles_75 = np.percentile(population, 75, axis=0)         fitness_list = fitness(population)         return (             gyak_sums[0], gyak_sums[1], (population[:, 0] > 1).sum(),             gyak_means[0], gyak_variances[0],             gyak_percentiles_25[0], gyak_medians[0], gyak_percentiles_75[0],             gyak_means[1], gyak_variances[1],             gyak_percentiles_25[1], gyak_medians[1], gyak_percentiles_75[1],             fitness_list.mean(), fitness_list.var(),             np.percentile(fitness_list, 25),             np.median(fitness_list),             np.percentile(fitness_list, 75)             )      # Creating the system with the starting state being     # half full cells containing only enzymes.     population = np.zeros((population_size, 2), dtype=int)     population[:, 0] = int(cell_size//2)     gen = 0     yield (gen, *population_stats(population), population_size,            cell_size, mutation_rate, replication_rate_p, "aft")     print(f"N = {population_size}, rMax = {cell_size}, "           f"aP = {replication_rate_p}, U = {mutation_rate}")      while population.size > 0 and gen < gen_max:         gen += 1          # Replicator proliferation until cell_size in each cell.         while np.any(population.sum(axis=1) < cell_size):             # Calculating probabilites of choosing a parasite to replication.             repl_probs_p = population[population.sum(axis=1) < cell_size].copy()             repl_probs_p[:, 1] *= replication_rate_p             repl_probs_p = repl_probs_p[:, 1]/repl_probs_p.sum(axis=1)             # Determining if an enzyme or a parasite replicates,             # and if an enzyme replicates, will it mutate to a parasite.             # (Outcome can differ among cells. Parasites don't mutate.)             repl_choices = np.random.random_sample(repl_probs_p.shape[0])             mut_choices = np.random.random_sample(repl_probs_p.shape[0])             lucky_replicators = np.zeros(repl_probs_p.shape[0], dtype=int)             lucky_replicators[                 (repl_choices < repl_probs_p) | (mut_choices < mutation_rate)                 ] = 1             population[population.sum(axis=1) < cell_size, lucky_replicators] += 1          if gen % 100 == 0:             yield (gen, *population_stats(population), population_size,                    cell_size, mutation_rate, replication_rate_p, "bef")          # Each cell divides.         new_population = np.empty_like(population)         new_population[:, 0] = np.random.binomial(population[:, 0], 0.5)         new_population[:, 1] = np.random.binomial(population[:, 1], 0.5)         population -= new_population          # Discarding dead cells.         population = np.concatenate([population[population[:, 0] > 1, :],                                      new_population[new_population[:, 0] > 1, :]])          # Choosing survivor cells according to their fitnesses         # if there are more viable cells than population_size.         # Hence population_size or less cells move on to the next generation.         if (population.size > 0) & (population.shape[0] > population_size):             fitness_list = fitness(population)             fitness_list = fitness_list/fitness_list.sum()             population = population[np.random.choice(population.shape[0],                                                      population_size,                                                      replace=False,                                                      p=fitness_list), :]         elif population.size == 0:             for i in range(2):                 yield (gen+i, *(0, 0)*9, population_size,                        cell_size, mutation_rate, replication_rate_p, "aft")             print(f"{gen} generations are done. Cells are extinct.")          if (gen % 100 == 0) & (population.size > 0):             yield (gen, *population_stats(population), population_size,                    cell_size, mutation_rate, replication_rate_p, "aft")          if (gen % 1000 == 0) & (population.size > 0):             print(f"{gen} generations are done.")   def write_out_file(result, n_run):     """     Write data to csv output file.      Parameters     ----------     result : generator object or list of generator objects         Contains data on the simulated system.      n_run : int         The number of consecutive runs.     """     local_time = time.strftime("%m_%d_%H_%M_%S_%Y", time.localtime(time.time()))     with open("output_data_" + local_time + ".csv", "w", newline="") as out_file:         out_file.write(             "gen;"             "eSzamSum;pSzamSum;alive;"             "eSzamAtl;eSzamVar;eSzamAKv;eSzamMed;eSzamFKv;"             "pSzamAtl;pSzamVar;pSzamAKv;pSzamMed;pSzamFKv;"             "fitAtl;fitVar;fitAKv;fitMed;fitFKv;"             "N;rMax;U;aP;boaSplit\n"             )         out_file = csv.writer(out_file, delimiter=";")         counter = 0         print(counter, "/", n_run)         for i in result:             out_file.writerows(i)             counter += 1             print(counter, "/", n_run)   RESULT = [simulation(100, 20, 1, 0, 10000)] RESULT.append(simulation(100, 20, 1, 1, 10000)) N_RUN = 2 write_out_file(RESULT, N_RUN) # Normally I call the functions from another script, # these last 4 lines are meant to be just an example. ```